aboutsummaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
authorAnton Yuzhaninov <citrin+git@citrin.ru>2021-09-21 11:14:10 +0100
committerAnton Yuzhaninov <citrin+git@citrin.ru>2021-09-21 11:14:10 +0100
commit1bb4bec6be3d30cdca78a90e361b10163331e1a0 (patch)
treedaec641507b5adb220d5d1e3b346762777e62d4f /src/client
parent8e8c92c0ca8c87a7dfb8921ae8aa72e6b767d97e (diff)
downloadrspamd-1bb4bec6be3d30cdca78a90e361b10163331e1a0.tar.gz
rspamd-1bb4bec6be3d30cdca78a90e361b10163331e1a0.zip
[Minor] Improve readability of recently changed rspamc code
Diffstat (limited to 'src/client')
-rw-r--r--src/client/rspamc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/client/rspamc.c b/src/client/rspamc.c
index 869a82b03..4bb632121 100644
--- a/src/client/rspamc.c
+++ b/src/client/rspamc.c
@@ -1035,8 +1035,6 @@ rspamc_counters_output (FILE *out, ucl_object_t *obj)
const ucl_object_t *cur, *sym, *weight, *freq, *freq_dev, *nhits;
ucl_object_iter_t iter = NULL;
gchar fmt_buf[64], dash_buf[82], sym_buf[82];
- gint l, i;
- gint max_len = sizeof("Symbol") - 1;
static const gint dashes = 44;
if (obj->type != UCL_ARRAY) {
@@ -1050,12 +1048,12 @@ rspamc_counters_output (FILE *out, ucl_object_t *obj)
}
/* Find maximum width of symbol's name */
+ gint max_len = sizeof("Symbol") - 1;
while ((cur = ucl_object_iterate (obj, &iter, true)) != NULL) {
sym = ucl_object_lookup (cur, "symbol");
if (sym != NULL) {
- l = sym->len;
- if (l > max_len) {
- max_len = l;
+ if (sym->len > max_len) {
+ max_len = sym->len;
}
}
}
@@ -1081,7 +1079,7 @@ rspamc_counters_output (FILE *out, ucl_object_t *obj)
"| %%3d | %%%ds | %%7.1f | %%6.3f(%%5.3f) | %%7ju |\n", max_len);
iter = NULL;
- i = 0;
+ gint i = 0;
while ((cur = ucl_object_iterate (obj, &iter, true)) != NULL) {
printf (" %s \n", dash_buf);
sym = ucl_object_lookup (cur, "symbol");