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) {
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to