diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-05-27 00:53:41 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-05-27 00:53:41 +0000 |
commit | 1c9ad62d26e65c7159a2a1752456da34def17632 (patch) | |
tree | 6d48e116ffe16f1ee06f073bbcea77d235cbfe4a /networking/ping.c | |
parent | b6adbf1be29841501cc49917249e85f273e1df7c (diff) | |
download | busybox-w32-1c9ad62d26e65c7159a2a1752456da34def17632.tar.gz busybox-w32-1c9ad62d26e65c7159a2a1752456da34def17632.tar.bz2 busybox-w32-1c9ad62d26e65c7159a2a1752456da34def17632.zip |
ping: fix wrong sign extension of packet id (bug 1373)
Diffstat (limited to 'networking/ping.c')
-rw-r--r-- | networking/ping.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/ping.c b/networking/ping.c index 2f331910e..9db3180f1 100644 --- a/networking/ping.c +++ b/networking/ping.c | |||
@@ -249,7 +249,7 @@ static unsigned datalen; /* intentionally uninitialized to work around gcc bug * | |||
249 | static int if_index; | 249 | static int if_index; |
250 | 250 | ||
251 | static unsigned long ntransmitted, nreceived, nrepeats, pingcount; | 251 | static unsigned long ntransmitted, nreceived, nrepeats, pingcount; |
252 | static int myid; | 252 | static uint16_t myid; |
253 | static unsigned tmin = UINT_MAX, tmax; | 253 | static unsigned tmin = UINT_MAX, tmax; |
254 | static unsigned long tsum; | 254 | static unsigned long tsum; |
255 | static char rcvd_tbl[MAX_DUP_CHK / 8]; | 255 | static char rcvd_tbl[MAX_DUP_CHK / 8]; |
@@ -667,7 +667,7 @@ int ping_main(int argc, char **argv) | |||
667 | source_lsa = xdotted2sockaddr(opt_I, 0); | 667 | source_lsa = xdotted2sockaddr(opt_I, 0); |
668 | } | 668 | } |
669 | } | 669 | } |
670 | myid = (int16_t) getpid(); | 670 | myid = (uint16_t) getpid(); |
671 | hostname = argv[optind]; | 671 | hostname = argv[optind]; |
672 | #if ENABLE_PING6 | 672 | #if ENABLE_PING6 |
673 | if (option_mask32 & OPT_IPV4) | 673 | if (option_mask32 & OPT_IPV4) |