Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin no need for struct timezone. From: Kevin Steves <k...



details:   https://anonhg.NetBSD.org/src/rev/6491d21a2788
branches:  trunk
changeset: 535048:6491d21a2788
user:      itojun <itojun%NetBSD.org@localhost>
date:      Fri Aug 09 02:57:09 2002 +0000

description:
no need for struct timezone.  From: Kevin Steves <kevin%atomicgears.com@localhost>

diffstat:

 usr.sbin/traceroute/traceroute.c   |  12 +++++-------
 usr.sbin/traceroute6/traceroute6.c |  12 +++++-------
 2 files changed, 10 insertions(+), 14 deletions(-)

diffs (100 lines):

diff -r 949f48134f49 -r 6491d21a2788 usr.sbin/traceroute/traceroute.c
--- a/usr.sbin/traceroute/traceroute.c  Fri Aug 09 02:46:56 2002 +0000
+++ b/usr.sbin/traceroute/traceroute.c  Fri Aug 09 02:57:09 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: traceroute.c,v 1.51 2002/08/01 09:03:50 itojun Exp $   */
+/*     $NetBSD: traceroute.c,v 1.52 2002/08/09 02:57:09 itojun Exp $   */
 
 /*
  * Copyright (c) 1988, 1989, 1991, 1994, 1995, 1996, 1997
@@ -29,7 +29,7 @@
 #else
 __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1991, 1994, 1995, 1996, 1997\n\
 The Regents of the University of California.  All rights reserved.\n");
-__RCSID("$NetBSD: traceroute.c,v 1.51 2002/08/01 09:03:50 itojun Exp $");
+__RCSID("$NetBSD: traceroute.c,v 1.52 2002/08/09 02:57:09 itojun Exp $");
 #endif
 #endif
 
@@ -909,12 +909,11 @@
                for (probe = 0; probe < nprobes; ++probe) {
                        int cc;
                        struct timeval t1, t2;
-                       struct timezone tz;
                        struct ip *ip;
-                       (void)gettimeofday(&t1, &tz);
+                       (void)gettimeofday(&t1, NULL);
                        send_probe(++seq, ttl, &t1);
                        while ((cc = wait_for_reply(s, from, &t1)) != 0) {
-                               (void)gettimeofday(&t2, &tz);
+                               (void)gettimeofday(&t2, NULL);
                                /*
                                 * Since we'll be receiving all ICMP
                                 * messages to this host above, we may
@@ -1028,7 +1027,6 @@
        fd_set *fdsp;
        size_t nfds;
        struct timeval now, wait;
-       struct timezone tz;
        int cc = 0;
        int fromlen = sizeof(*fromp);
        int retval;
@@ -1043,7 +1041,7 @@
 
        wait.tv_sec = tp->tv_sec + waittime;
        wait.tv_usec = tp->tv_usec;
-       (void)gettimeofday(&now, &tz);
+       (void)gettimeofday(&now, NULL);
        tvsub(&wait, &now);
 
        if (wait.tv_sec < 0) {
diff -r 949f48134f49 -r 6491d21a2788 usr.sbin/traceroute6/traceroute6.c
--- a/usr.sbin/traceroute6/traceroute6.c        Fri Aug 09 02:46:56 2002 +0000
+++ b/usr.sbin/traceroute6/traceroute6.c        Fri Aug 09 02:57:09 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: traceroute6.c,v 1.23 2002/06/29 07:49:25 itojun Exp $  */
+/*     $NetBSD: traceroute6.c,v 1.24 2002/08/09 02:57:10 itojun Exp $  */
 /*     $KAME: traceroute6.c,v 1.53 2002/06/09 02:45:52 itojun Exp $    */
 
 /*
@@ -79,7 +79,7 @@
 #else
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: traceroute6.c,v 1.23 2002/06/29 07:49:25 itojun Exp $");
+__RCSID("$NetBSD: traceroute6.c,v 1.24 2002/08/09 02:57:10 itojun Exp $");
 #endif
 #endif
 
@@ -327,7 +327,6 @@
 
 int rcvsock;                   /* receive (icmp) socket file descriptor */
 int sndsock;                   /* send (udp) socket file descriptor */
-struct timezone tz;            /* leftover */
 
 struct msghdr rcvmhdr;
 struct iovec rcviov[2];
@@ -839,12 +838,11 @@
                for (probe = 0; probe < nprobes; ++probe) {
                        int cc;
                        struct timeval t1, t2;
-                       struct timezone tz;
 
-                       (void) gettimeofday(&t1, &tz);
+                       (void) gettimeofday(&t1, NULL);
                        send_probe(++seq, hops);
                        while ((cc = wait_for_reply(rcvsock, &rcvmhdr))) {
-                               (void) gettimeofday(&t2, &tz);
+                               (void) gettimeofday(&t2, NULL);
                                if ((i = packet_ok(&rcvmhdr, cc, seq))) {
                                        if (! IN6_ARE_ADDR_EQUAL(&Rcv.sin6_addr,
                                            &lastaddr)) {
@@ -970,7 +968,7 @@
 
        op->seq = seq;
        op->hops = hops;
-       (void) gettimeofday(&op->tv, &tz);
+       (void) gettimeofday(&op->tv, NULL);
 
        i = sendto(sndsock, (char *)outpacket, datalen , 0,
            (struct sockaddr *)&Dst, Dst.sin6_len);



Home | Main Index | Thread Index | Old Index