summaryrefslogtreecommitdiff
path: root/networking/traceroute.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-07-12 19:17:55 +0000
committerRob Landley <rob@landley.net>2006-07-12 19:17:55 +0000
commitc9c1a41c581101f53cc36efae53cd8ebb568962f (patch)
tree0aa4024f33e22567444f78d83d7d4b7986abe795 /networking/traceroute.c
parent801ab140132a111e9524371c9b8d425579692389 (diff)
downloadbusybox-w32-c9c1a41c581101f53cc36efae53cd8ebb568962f.tar.gz
busybox-w32-c9c1a41c581101f53cc36efae53cd8ebb568962f.tar.bz2
busybox-w32-c9c1a41c581101f53cc36efae53cd8ebb568962f.zip
A couple things that got tangled up in my tree, easier to check in both than
untangle them: Rewrite u_signal_names() into get_signum() and get_signame(), plus trim the signal list to that required by posix (they can specify the numbers for the rest if they really need them). (This is preparatory cleanup for adding a timeout applet like Roberto Foglietta wants.) Export the itoa (added due to Denis Vlasenko, although it's not quite his preferred implementation) from xfuncs.c so it's actually used, and remove several other redundant implementations of itoa and utoa() in the tree.
Diffstat (limited to 'networking/traceroute.c')
-rw-r--r--networking/traceroute.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/networking/traceroute.c b/networking/traceroute.c
index 190f19ddc..79f3957a6 100644
--- a/networking/traceroute.c
+++ b/networking/traceroute.c
@@ -548,7 +548,7 @@ static int
548wait_for_reply(int sock, struct sockaddr_in *fromp, const struct timeval *tp) 548wait_for_reply(int sock, struct sockaddr_in *fromp, const struct timeval *tp)
549{ 549{
550 fd_set fds; 550 fd_set fds;
551 struct timeval now, wait; 551 struct timeval now, tvwait;
552 struct timezone tz; 552 struct timezone tz;
553 int cc = 0; 553 int cc = 0;
554 socklen_t fromlen = sizeof(*fromp); 554 socklen_t fromlen = sizeof(*fromp);
@@ -556,12 +556,12 @@ wait_for_reply(int sock, struct sockaddr_in *fromp, const struct timeval *tp)
556 FD_ZERO(&fds); 556 FD_ZERO(&fds);
557 FD_SET(sock, &fds); 557 FD_SET(sock, &fds);
558 558
559 wait.tv_sec = tp->tv_sec + waittime; 559 tvwait.tv_sec = tp->tv_sec + waittime;
560 wait.tv_usec = tp->tv_usec; 560 tvwait.tv_usec = tp->tv_usec;
561 (void)gettimeofday(&now, &tz); 561 (void)gettimeofday(&now, &tz);
562 tvsub(&wait, &now); 562 tvsub(&tvwait, &now);
563 563
564 if (select(sock + 1, &fds, NULL, NULL, &wait) > 0) 564 if (select(sock + 1, &fds, NULL, NULL, &tvwait) > 0)
565 cc = recvfrom(sock, (char *)packet, sizeof(packet), 0, 565 cc = recvfrom(sock, (char *)packet, sizeof(packet), 0,
566 (struct sockaddr *)fromp, &fromlen); 566 (struct sockaddr *)fromp, &fromlen);
567 567