From b38e7cb9b84ea5c3a5b34ccab57c51dfae0cf44b Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Wed, 16 Mar 2016 21:15:21 +1000 Subject: [PATCH] * fix length specifiers for size_t --- src/config.c | 4 ++-- src/filter.c | 4 ++-- src/jail.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/config.c b/src/config.c index 5e7a7c5..17a4860 100644 --- a/src/config.c +++ b/src/config.c @@ -220,7 +220,7 @@ f2b_config_load(f2b_config_t *config, const char *path, bool recursion) { section = f2b_config_section_append(config, section); } else { skip_section = true; - f2b_log_msg(log_error, "unknown section at line %d: %s", linenum, p); + f2b_log_msg(log_error, "unknown section at line %zu: %s", linenum, p); } break; default: @@ -235,7 +235,7 @@ f2b_config_load(f2b_config_t *config, const char *path, bool recursion) { } else if (param) { section->param = f2b_config_param_append(section->param, param, false); } else { - f2b_log_msg(log_error, "can't parse key/value at line %d: %s", linenum, p); + f2b_log_msg(log_error, "can't parse key/value at line %zu: %s", linenum, p); continue; } break; diff --git a/src/filter.c b/src/filter.c index 018978e..b096a00 100644 --- a/src/filter.c +++ b/src/filter.c @@ -50,11 +50,11 @@ f2b_filter_load_file(f2b_filter_t *filter, const char *path) { break; default: if (strstr(p, HOST_TOKEN) == NULL) { - f2b_log_msg(log_warn, "pattern at %s:%d don't have '%s' marker, ignored", path, linenum, HOST_TOKEN); + f2b_log_msg(log_warn, "pattern at %s:%zu don't have '%s' marker, ignored", path, linenum, HOST_TOKEN); continue; } if (!filter->append(filter->cfg, p)) { - f2b_log_msg(log_warn, "can't create regex from pattern at %s:%d: %s", path, linenum, p); + f2b_log_msg(log_warn, "can't create regex from pattern at %s:%zu: %s", path, linenum, p); continue; } break; diff --git a/src/jail.c b/src/jail.c index 0e8c626..fd38ed7 100644 --- a/src/jail.c +++ b/src/jail.c @@ -226,7 +226,7 @@ f2b_jail_process(f2b_jail_t *jail) { f2b_matches_expire(&addr->matches, findtime); f2b_matches_append(&addr->matches, now); if (addr->matches.used < jail->maxretry) { - f2b_log_msg(log_info, "jail '%s': new match %s (%d/%d)", jail->name, matchbuf, addr->matches.used, addr->matches.max); + f2b_log_msg(log_info, "jail '%s': new match %s (%zu/%zu)", jail->name, matchbuf, addr->matches.used, addr->matches.max); continue; } /* limit reached, ban ip */