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
2023-11-09 12:37:25 +09:00
parent e783c82b84
commit eb03b1a6db
-2
View File
@@ -630,12 +630,10 @@ parseoptions(
if (pfx_match && optresult == optn_err) { if (pfx_match && optresult == optn_err) {
char pfxbuf[BUFSZ], *pfxp; char pfxbuf[BUFSZ], *pfxp;
if (opts) {
Snprintf(pfxbuf, sizeof pfxbuf, "%s", opts); Snprintf(pfxbuf, sizeof pfxbuf, "%s", opts);
if ((pfxp = strchr(pfxbuf, ':')) != 0) if ((pfxp = strchr(pfxbuf, ':')) != 0)
*pfxp = '\0'; *pfxp = '\0';
config_error_add("bad option suffix variation '%s'", pfxbuf); config_error_add("bad option suffix variation '%s'", pfxbuf);
}
return FALSE; return FALSE;
} }
if (got_match && optresult == optn_err) if (got_match && optresult == optn_err)