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