summaryrefslogtreecommitdiff
path: root/sbin/ping6/ping6.c
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2003-07-25 06:01:43 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2003-07-25 06:01:43 +0000
commit4d8ed4580934af54393352b275afe45e5a1e2ce0 (patch)
tree435f559c40ea1d3ce85e93a8bbb93470d3a671c8 /sbin/ping6/ping6.c
parentb2f361b9902afc9eb0361af19bbaea3ac700a80d (diff)
packet loss count in floating point (double). Wouter Clarie
Diffstat (limited to 'sbin/ping6/ping6.c')
-rw-r--r--sbin/ping6/ping6.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/ping6/ping6.c b/sbin/ping6/ping6.c
index 63ec0fdf8be..2528ed2d18c 100644
--- a/sbin/ping6/ping6.c
+++ b/sbin/ping6/ping6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ping6.c,v 1.55 2003/06/11 06:22:15 deraadt Exp $ */
+/* $OpenBSD: ping6.c,v 1.56 2003/07/25 06:01:42 itojun Exp $ */
/* $KAME: ping6.c,v 1.163 2002/10/25 02:19:06 itojun Exp $ */
/*
@@ -2182,8 +2182,8 @@ summary(void)
if (nreceived > ntransmitted)
(void)printf("-- somebody's duplicating packets!");
else
- (void)printf("%d%% packet loss",
- (int) (((ntransmitted - nreceived) * 100) /
+ (void)printf("%.1lf%% packet loss",
+ ((((double)ntransmitted - nreceived) * 100) /
ntransmitted));
}
(void)putchar('\n');