strchr() returns a pointer not an int.

Reported by:	bjk
Approved by:	des (blanket, implicit)
MFC after:	3 days
This commit is contained in:
Cy Schubert 2020-02-18 11:27:05 +00:00
parent 9c9372ad3f
commit 6f1ed8ae58

View File

@ -252,7 +252,7 @@ from_match(const char *tok, const char *string)
&& strcasecmp(tok, string + str_len - tok_len) == 0)
return (YES);
} else if (strcmp(tok, "LOCAL") == 0) { /* local: no dots */
if (strchr(string, '.') == 0)
if (strchr(string, '.') == NULL)
return (YES);
} else if (tok[(tok_len = strlen(tok)) - 1] == '.' /* network */
&& strncmp(tok, string, tok_len) == 0) {