summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Steves <stevesk@cvs.openbsd.org>2002-08-08 23:53:22 +0000
committerKevin Steves <stevesk@cvs.openbsd.org>2002-08-08 23:53:22 +0000
commit86a8f80fb67e72c1dbe3c24fa52e14c29aed8c42 (patch)
tree2a37281a7cfdc872c95ae29448f790471da25583
parentc8f228f0b2c623c862078ed8abcb743e30e149f6 (diff)
remove unused struct timezone; ok itojun@
-rw-r--r--usr.sbin/traceroute/traceroute.c14
-rw-r--r--usr.sbin/traceroute6/traceroute6.c10
2 files changed, 10 insertions, 14 deletions
diff --git a/usr.sbin/traceroute/traceroute.c b/usr.sbin/traceroute/traceroute.c
index 42a71db7528..5342e9d06c4 100644
--- a/usr.sbin/traceroute/traceroute.c
+++ b/usr.sbin/traceroute/traceroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: traceroute.c,v 1.47 2002/07/03 23:01:10 deraadt Exp $ */
+/* $OpenBSD: traceroute.c,v 1.48 2002/08/08 23:53:21 stevesk Exp $ */
/* $NetBSD: traceroute.c,v 1.10 1995/05/21 15:50:45 mycroft Exp $ */
/*-
@@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)traceroute.c 8.1 (Berkeley) 6/6/93";*/
#else
-static char rcsid[] = "$OpenBSD: traceroute.c,v 1.47 2002/07/03 23:01:10 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: traceroute.c,v 1.48 2002/08/08 23:53:21 stevesk Exp $";
#endif
#endif /* not lint */
@@ -276,7 +276,6 @@ void usage(void);
int s; /* receive (icmp) socket file descriptor */
int sndsock; /* send (udp) socket file descriptor */
-struct timezone tz; /* leftover */
int datalen; /* How much data */
int headerlen; /* How long packet's header is */
@@ -565,13 +564,12 @@ main(int argc, char *argv[])
for (probe = 0, loss = 0; probe < nprobes; ++probe) {
int cc;
struct timeval t1, t2;
- struct timezone tz;
int code;
- (void) gettimeofday(&t1, &tz);
+ (void) gettimeofday(&t1, NULL);
send_probe(++seq, ttl, incflag, &to);
while ((cc = wait_for_reply(s, &from, &t1))) {
- (void) gettimeofday(&t2, &tz);
+ (void) gettimeofday(&t2, NULL);
if (t2.tv_sec - t1.tv_sec > waittime) {
cc = 0;
break;
@@ -767,7 +765,7 @@ send_probe(int seq, int ttl, int iflag, struct sockaddr_in *to)
}
op->seq = seq;
op->ttl = ttl;
- (void) gettimeofday(&tv, &tz);
+ (void) gettimeofday(&tv, NULL);
/*
* We don't want hostiles snooping the net to get any useful
@@ -781,7 +779,7 @@ send_probe(int seq, int ttl, int iflag, struct sockaddr_in *to)
* work wants to use them they will have to subtract out the
* perturbation first.
*/
- (void) gettimeofday(&tv, &tz);
+ (void) gettimeofday(&tv, NULL);
op->sec = htonl(tv.tv_sec + sec_perturb);
op->usec = htonl((tv.tv_usec + usec_perturb) % 1000000);
diff --git a/usr.sbin/traceroute6/traceroute6.c b/usr.sbin/traceroute6/traceroute6.c
index 1e1f1821946..d70a7e09304 100644
--- a/usr.sbin/traceroute6/traceroute6.c
+++ b/usr.sbin/traceroute6/traceroute6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: traceroute6.c,v 1.25 2002/06/29 07:46:11 itojun Exp $ */
+/* $OpenBSD: traceroute6.c,v 1.26 2002/08/08 23:53:21 stevesk Exp $ */
/* $KAME: traceroute6.c,v 1.50 2002/05/26 13:12:07 itojun Exp $ */
/*
@@ -320,7 +320,6 @@ void usage(void);
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];
@@ -832,12 +831,11 @@ main(argc, argv)
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)) {
@@ -963,7 +961,7 @@ send_probe(seq, hops)
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);