svn commit: r358069 - head/lib/libpam/modules/pam_login_access

Cy Schubert cy at FreeBSD.org
Tue Feb 18 11:27:07 UTC 2020


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) {


More information about the svn-src-head mailing list