From: Vsevolod Stakhov Date: Sat, 29 Jan 2022 13:08:38 +0000 (+0000) Subject: [Minor] Sigh, reverse loop is bloody hard in C X-Git-Tag: 3.2~78 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cc7c9000e05e1810d408f4e9b40e2073e85cb0fb;p=thirdparty%2Frspamd.git [Minor] Sigh, reverse loop is bloody hard in C --- diff --git a/src/libmime/scan_result.c b/src/libmime/scan_result.c index d2f7e0a8bc..07800ea060 100644 --- a/src/libmime/scan_result.c +++ b/src/libmime/scan_result.c @@ -903,7 +903,7 @@ rspamd_check_action_metric (struct rspamd_task *task, /* * Select result by score */ - for (unsigned int i = scan_result->nactions - 1; i >= 0; i--) { + for (size_t i = scan_result->nactions - 1; i != (size_t)-1; i--) { action_lim = &scan_result->actions_config[i]; sc = action_lim->cur_limit;