Date: Tue, 18 Feb 2020 11:27:05 +0000 (UTC) From: Cy Schubert <cy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358069 - head/lib/libpam/modules/pam_login_access Message-ID: <202002181127.01IBR5XQ016427@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cy Date: Tue Feb 18 11:27:05 2020 New Revision: 358069 URL: https://svnweb.freebsd.org/changeset/base/358069 Log: strchr() returns a pointer not an int. Reported by: bjk Approved by: des (blanket, implicit) MFC after: 3 days Modified: head/lib/libpam/modules/pam_login_access/login_access.c Modified: head/lib/libpam/modules/pam_login_access/login_access.c ============================================================================== --- head/lib/libpam/modules/pam_login_access/login_access.c Tue Feb 18 11:27:02 2020 (r358068) +++ head/lib/libpam/modules/pam_login_access/login_access.c Tue Feb 18 11:27:05 2020 (r358069) @@ -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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002181127.01IBR5XQ016427>