diff options
author | dimitri staessens <dimitri.staessens@ugent.be> | 2017-04-03 08:36:50 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@ugent.be> | 2017-04-03 08:36:50 +0200 |
commit | 8c9c6c9360c9d034c7b89107199766d252edbea8 (patch) | |
tree | f27c679531f16b2a6e89072da592f4549a96d7c9 /src | |
parent | 3bf32626e42ade409a32503f23ff754aaa5e17c2 (diff) | |
download | ouroboros-8c9c6c9360c9d034c7b89107199766d252edbea8.tar.gz ouroboros-8c9c6c9360c9d034c7b89107199766d252edbea8.zip |
tools: Fix oping client output
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/oping/oping_client.c | 4 |
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) { |