summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authordimitri staessens <[email protected]>2017-04-03 08:36:50 +0200
committerdimitri staessens <[email protected]>2017-04-03 08:36:50 +0200
commit8c9c6c9360c9d034c7b89107199766d252edbea8 (patch)
treef27c679531f16b2a6e89072da592f4549a96d7c9 /src/tools
parent3bf32626e42ade409a32503f23ff754aaa5e17c2 (diff)
downloadouroboros-8c9c6c9360c9d034c7b89107199766d252edbea8.tar.gz
ouroboros-8c9c6c9360c9d034c7b89107199766d252edbea8.zip
tools: Fix oping client output
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/oping/oping_client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/oping/oping_client.c b/src/tools/oping/oping_client.c
index 43f402a2..4cc14623 100644
--- a/src/tools/oping/oping_client.c
+++ b/src/tools/oping/oping_client.c
@@ -233,8 +233,8 @@ int client_main(void)
printf("--- %s ping statistics ---\n", client.s_apn);
printf("%d SDUs transmitted, ", client.sent);
printf("%d received, ", client.rcvd);
- printf("%d%% packet loss, ", client.sent == 0 ? 0 :
- 100 - (100 * (client.rcvd / client.sent)));
+ printf("%.0lf%% packet loss, ", client.sent == 0 ? 0 :
+ ceil(100 - (100 * (client.rcvd / (float) client.sent))));
printf("time: %.3f ms\n", ts_diff_us(&tic, &toc) / 1000.0);
if (client.rcvd > 0) {