commit 8ddf1aa: [Minor] Add missing division

Vsevolod Stakhov vsevolod at highsecure.ru
Sun Feb 27 09:56:04 UTC 2022


Author: Vsevolod Stakhov
Date: 2022-02-27 09:49:27 +0000
URL: https://github.com/rspamd/rspamd/commit/8ddf1aaca978c045a14f82e5f7dcd3d8ca083afb (HEAD -> master)

[Minor] Add missing division
Pointed by: @moisseev

---
 src/rspamd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rspamd.c b/src/rspamd.c
index 8f33ccc48..d1eaa205d 100644
--- a/src/rspamd.c
+++ b/src/rspamd.c
@@ -1127,7 +1127,7 @@ rspamd_stat_update_handler (struct ev_loop *loop, ev_timer *w, int revents)
 				rate,
 				(new_spam - old_spam) / w->repeat,
 				(new_ham - old_ham) / w->repeat,
-				cnt > 0 ? sum : 0);
+				cnt > 0 ? sum / cnt : 0);
 		setproctitle (proctitle);
 	}
 


More information about the Commits mailing list