From 91019d575c2b25a40bdb39de56ebea246ea950ce Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 14 Nov 2014 15:53:34 +0000 Subject: [PATCH] Fix percents display in rspamc. --- src/client/rspamc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/rspamc.c b/src/client/rspamc.c index ecae8cbcc..4dd054725 100644 --- a/src/client/rspamc.c +++ b/src/client/rspamc.c @@ -631,16 +631,16 @@ rspamc_stat_actions (ucl_object_t *obj, GString *out, gint64 scanned) gint64 cnt = ucl_object_toint (cur); rspamd_printf_gstring (out, "Messages with action %s: %L" ", %.2f%%\n", ucl_object_key (cur), cnt, - (gdouble)cnt / (gdouble)scanned); + ((gdouble)cnt / (gdouble)scanned) * 100.); } } spam = ucl_object_toint (ucl_object_find_key (obj, "spam_count")); ham = ucl_object_toint (ucl_object_find_key (obj, "ham_count")); rspamd_printf_gstring (out, "Messages treated as spam: %L, %.2f%%\n", spam, - (gdouble)spam / (gdouble)scanned); + ((gdouble)spam / (gdouble)scanned) * 100.); rspamd_printf_gstring (out, "Messages treated as ham: %L, %.2f%%\n", ham, - (gdouble)ham / (gdouble)scanned); + ((gdouble)ham / (gdouble)scanned) * 100.); } static void -- 2.39.5