aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-06-06 11:47:00 +0000
committerEric Andersen <andersen@codepoet.org>2002-06-06 11:47:00 +0000
commite90e741b1eaf4a22b4c13de73a477f8eb45254b1 (patch)
tree856f923633b940cc2179cf4cc4bd56731bdc1af1
parentfc059090b6954348ee4510ff0dac097bf3a9b682 (diff)
downloadbusybox-w32-e90e741b1eaf4a22b4c13de73a477f8eb45254b1.tar.gz
busybox-w32-e90e741b1eaf4a22b4c13de73a477f8eb45254b1.tar.bz2
busybox-w32-e90e741b1eaf4a22b4c13de73a477f8eb45254b1.zip
Per discussion with vodz, Tim's changes do not seem to make sense.
Revert them. -Erik
-rw-r--r--networking/ping.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/networking/ping.c b/networking/ping.c
index dd5596486..f21f2b1a8 100644
--- a/networking/ping.c
+++ b/networking/ping.c
@@ -1,6 +1,6 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* 2/*
3 * $Id: ping.c,v 1.51 2002/05/18 09:16:04 timr Exp $ 3 * $Id: ping.c,v 1.52 2002/06/06 11:47:00 andersen Exp $
4 * Mini ping implementation for busybox 4 * Mini ping implementation for busybox
5 * 5 *
6 * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> 6 * Copyright (C) 1999 by Randolph Chung <tausq@debian.org>
@@ -147,7 +147,7 @@ static const int PINGINTERVAL = 1; /* second */
147#define CLR(bit) (A(bit) &= (~B(bit))) 147#define CLR(bit) (A(bit) &= (~B(bit)))
148#define TST(bit) (A(bit) & B(bit)) 148#define TST(bit) (A(bit) & B(bit))
149 149
150static int ping(const char *host); 150static void ping(const char *host);
151 151
152/* common routines */ 152/* common routines */
153static int in_cksum(unsigned short *buf, int sz) 153static int in_cksum(unsigned short *buf, int sz)
@@ -414,7 +414,7 @@ static void unpack(char *buf, int sz, struct sockaddr_in *from)
414 icmppkt->icmp_type, icmp_type_name (icmppkt->icmp_type)); 414 icmppkt->icmp_type, icmp_type_name (icmppkt->icmp_type));
415} 415}
416 416
417static int ping(const char *host) 417static void ping(const char *host)
418{ 418{
419 char packet[datalen + MAXIPLEN + MAXICMPLEN]; 419 char packet[datalen + MAXIPLEN + MAXICMPLEN];
420 int sockopt; 420 int sockopt;
@@ -468,7 +468,6 @@ static int ping(const char *host)
468 break; 468 break;
469 } 469 }
470 pingstats(0); 470 pingstats(0);
471 return(nreceived > 0);
472} 471}
473 472
474extern int ping_main(int argc, char **argv) 473extern int ping_main(int argc, char **argv)
@@ -510,7 +509,8 @@ extern int ping_main(int argc, char **argv)
510 show_usage(); 509 show_usage();
511 510
512 myid = getpid() & 0xFFFF; 511 myid = getpid() & 0xFFFF;
513 return ping(*argv); 512 ping(*argv);
513 return EXIT_SUCCESS;
514} 514}
515#endif /* ! CONFIG_FEATURE_FANCY_PING */ 515#endif /* ! CONFIG_FEATURE_FANCY_PING */
516 516