From eb8e5f2842618cecba0565d8a86d921b2a770497 Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Tue, 30 Aug 2016 12:57:44 +1000 Subject: [PATCH] * fix cppcheck warnings --- src/commands.c | 2 +- src/jail.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands.c b/src/commands.c index 08ebc7b..2d62454 100644 --- a/src/commands.c +++ b/src/commands.c @@ -12,7 +12,7 @@ struct f2b_cmd_t { const char *help; const char *tokens[CMD_TOKENS_MAX]; char *data; -} commands[] = { +} commands[CMD_MAX_NUMBER] = { [CMD_NONE] = { .tokens = { NULL }, .help = "Unspecified command" diff --git a/src/jail.c b/src/jail.c index 903f7d3..5f0b841 100644 --- a/src/jail.c +++ b/src/jail.c @@ -77,7 +77,7 @@ f2b_jail_apply_config(f2b_jail_t *jail, f2b_config_section_t *section) { } if (strcmp(param->name, "maxretry") == 0) { jail->maxretry = atoi(param->value); - if (jail->maxretry <= 0) + if (jail->maxretry == 0) jail->maxretry = DEFAULT_MAXRETRY; continue; }