Skip to content

Commit

Permalink
doveconf: Fix compiler nit
Browse files Browse the repository at this point in the history
Ensure secret_r cannot be NULL unless none was found.
  • Loading branch information
cmouse committed Aug 21, 2018
1 parent 0b1ee35 commit 186ac8b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/config/doveconf.c
Expand Up @@ -183,6 +183,7 @@ static const char *find_next_secret(const char *input, const char **secret_r)
{
const char *const *secret;
const char *ptr = NULL;
*secret_r = NULL;
for(secret = secrets; *secret != NULL; secret++) {
const char *cptr;
if ((cptr = strstr(input, *secret)) != NULL) {
Expand All @@ -192,6 +193,7 @@ static const char *find_next_secret(const char *input, const char **secret_r)
}
}
}
i_assert(*secret_r != NULL || ptr == NULL);
return ptr;
}

Expand Down

0 comments on commit 186ac8b

Please sign in to comment.