svn commit: trunk/busybox/networking

vda at busybox.net vda at busybox.net
Sat May 26 17:53:44 PDT 2007


Author: vda
Date: 2007-05-26 17:53:41 -0700 (Sat, 26 May 2007)
New Revision: 18697

Log:
ping: fix wrong sign extension of packet id (bug 1373)


Modified:
   trunk/busybox/networking/ping.c


Changeset:
Modified: trunk/busybox/networking/ping.c
===================================================================
--- trunk/busybox/networking/ping.c	2007-05-26 19:00:18 UTC (rev 18696)
+++ trunk/busybox/networking/ping.c	2007-05-27 00:53:41 UTC (rev 18697)
@@ -249,7 +249,7 @@
 static int if_index;
 
 static unsigned long ntransmitted, nreceived, nrepeats, pingcount;
-static int myid;
+static uint16_t myid;
 static unsigned tmin = UINT_MAX, tmax;
 static unsigned long tsum;
 static char rcvd_tbl[MAX_DUP_CHK / 8];
@@ -667,7 +667,7 @@
 			source_lsa = xdotted2sockaddr(opt_I, 0);
 		}
 	}
-	myid = (int16_t) getpid();
+	myid = (uint16_t) getpid();
 	hostname = argv[optind];
 #if ENABLE_PING6
 	if (option_mask32 & OPT_IPV4)



More information about the busybox-cvs mailing list