remove unnecessary condition on parseoptions()

`opts` here is always non-null, otherwise it leads segv at earlier code.
This commit is contained in:
SHIRAKATA Kentaro
2022-06-20 20:32:23 +09:00
parent e783c82b84
commit eb03b1a6db

View File

@@ -630,12 +630,10 @@ parseoptions(
if (pfx_match && optresult == optn_err) {
char pfxbuf[BUFSZ], *pfxp;
if (opts) {
Snprintf(pfxbuf, sizeof pfxbuf, "%s", opts);
if ((pfxp = strchr(pfxbuf, ':')) != 0)
*pfxp = '\0';
config_error_add("bad option suffix variation '%s'", pfxbuf);
}
Snprintf(pfxbuf, sizeof pfxbuf, "%s", opts);
if ((pfxp = strchr(pfxbuf, ':')) != 0)
*pfxp = '\0';
config_error_add("bad option suffix variation '%s'", pfxbuf);
return FALSE;
}
if (got_match && optresult == optn_err)