summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
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) {