Browse Source

* fix length specifiers for size_t

master
Alex 'AdUser' Z 8 years ago
parent
commit
b38e7cb9b8
  1. 4
      src/config.c
  2. 4
      src/filter.c
  3. 2
      src/jail.c

4
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;

4
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;

2
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 */

Loading…
Cancel
Save