aboutsummaryrefslogtreecommitdiff
path: root/sbin/ping/ping.c
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>1999-04-25 22:33:30 +0000
committerWarner Losh <imp@FreeBSD.org>1999-04-25 22:33:30 +0000
commitebe70c8f689aca6d1c8800d98f0582f6213cf129 (patch)
treefc92f5fe0c58b561e9f85d3b5922c8970710dbd5 /sbin/ping/ping.c
parentdcb0ae4ed8d8ff789903b161e53031f3f9280cc2 (diff)
downloadsrc-ebe70c8f689aca6d1c8800d98f0582f6213cf129.tar.gz
src-ebe70c8f689aca6d1c8800d98f0582f6213cf129.zip
More egcs warning fixes:
o main returns int not void o use braces to avoid potentially ambiguous else Note: The fix to natd is potentially functional in nature since I used the indentation as the right thing rather than the struct semantics. Someone more familiar with the code should double check me on this one. Reviewed by: obrien and chuckr
Notes
Notes: svn path=/head/; revision=46080
Diffstat (limited to 'sbin/ping/ping.c')
-rw-r--r--sbin/ping/ping.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c
index b1e20e8dec80..6e4124137197 100644
--- a/sbin/ping/ping.c
+++ b/sbin/ping/ping.c
@@ -45,7 +45,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)ping.c 8.1 (Berkeley) 6/5/93";
#endif
static const char rcsid[] =
- "$Id: ping.c,v 1.41 1998/08/26 18:51:37 des Exp $";
+ "$Id: ping.c,v 1.42 1999/01/06 07:54:28 imp Exp $";
#endif /* not lint */
/*
@@ -1013,13 +1013,14 @@ finish()
(void)printf("%ld packets received, ", nreceived);
if (nrepeats)
(void)printf("+%ld duplicates, ", nrepeats);
- if (ntransmitted)
+ if (ntransmitted) {
if (nreceived > ntransmitted)
(void)printf("-- somebody's printing up packets!");
else
(void)printf("%d%% packet loss",
(int) (((ntransmitted - nreceived) * 100) /
ntransmitted));
+ }
(void)putchar('\n');
if (nreceived && timing) {
double n = nreceived + nrepeats;