From: Aki Tuomi Date: Mon, 6 Aug 2018 08:36:41 +0000 (+0300) Subject: doveconf: Fix compiler nit X-Git-Tag: 2.3.9~1560 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c51de06b0d3380a85de411a4b346ae4eaf1541d5;p=thirdparty%2Fdovecot%2Fcore.git doveconf: Fix compiler nit Ensure secret_r cannot be NULL unless none was found. --- diff --git a/src/config/doveconf.c b/src/config/doveconf.c index 709a53188f..bf1670a103 100644 --- a/src/config/doveconf.c +++ b/src/config/doveconf.c @@ -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) { @@ -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; }