From: Florian Forster Date: Thu, 20 Nov 2014 13:46:40 +0000 (+0100) Subject: src/oping.c: Fix status output. X-Git-Tag: liboping-1.8.0~1 X-Git-Url: https://git.tokkee.org/?p=liboping.git;a=commitdiff_plain;h=d26cd43b41138c4cbe29f0be9b9dc020520b6375;ds=sidebyside src/oping.c: Fix status output. This is a really dirty hack: If the percentile and/or median output decreases, the output may have less characters than previously. Add spaces at the end of the string to clear digits with may have been there, to avoid the "maximum" value be appear to go through the roof. --- diff --git a/src/oping.c b/src/oping.c index debe237..e6be877 100644 --- a/src/oping.c +++ b/src/oping.c @@ -1219,7 +1219,7 @@ static int update_stats_from_context (ping_context_t *ctx, pingobj_iter_t *iter) percentile = percentile_to_latency (ctx, opt_percentile); mvwprintw (ctx->window, /* y = */ 2, /* x = */ 2, - "RTT[ms]: min = %.0f, median = %.0f, p(%.0f) = %.0f, max = %.0f", + "RTT[ms]: min = %.0f, median = %.0f, p(%.0f) = %.0f, max = %.0f ", min, median, opt_percentile, percentile, max); }