aboutsummaryrefslogtreecommitdiff
path: root/ping.c
diff options
context:
space:
mode:
Diffstat (limited to 'ping.c')
-rw-r--r--ping.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/ping.c b/ping.c
index c9cf5ffb4..ef6503aeb 100644
--- a/ping.c
+++ b/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.11 2000/02/08 19:58:47 erik Exp $ 3 * $Id: ping.c,v 1.12 2000/04/13 18:49:43 erik 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>
@@ -182,9 +182,9 @@ extern int ping_main(int argc, char **argv)
182static const char *ping_usage = "ping [OPTION]... host\n\n" 182static const char *ping_usage = "ping [OPTION]... host\n\n"
183 "Send ICMP ECHO_REQUEST packets to network hosts.\n\n" 183 "Send ICMP ECHO_REQUEST packets to network hosts.\n\n"
184 "Options:\n" 184 "Options:\n"
185 "\t-q\t\tQuiet mode, only displays output at start" 185 "\t-c COUNT\tSend only COUNT pings.\n"
186 186 "\t-q\t\tQuiet mode, only displays output at start\n"
187 "\t\t\tand when finished.\n" "\t-c COUNT\tSend only COUNT pings.\n"; 187 "\t\t\tand when finished.\n";
188 188
189static char *hostname = NULL; 189static char *hostname = NULL;
190static struct sockaddr_in pingaddr; 190static struct sockaddr_in pingaddr;
@@ -418,9 +418,7 @@ extern int ping_main(int argc, char **argv)
418 argv++; 418 argv++;
419 options = 0; 419 options = 0;
420 /* Parse any options */ 420 /* Parse any options */
421 while (argc > 1) { 421 while (argc >= 1 && **argv == '-') {
422 if (**argv != '-')
423 usage(ping_usage);
424 thisarg = *argv; 422 thisarg = *argv;
425 thisarg++; 423 thisarg++;
426 switch (*thisarg) { 424 switch (*thisarg) {