svn commit: r358197 - in stable: 11/lib/libpam/modules/pam_login_access 12/lib/libpam/modules/pam_login_access

Cy Schubert cy at FreeBSD.org
Fri Feb 21 04:23:55 UTC 2020


Author: cy
Date: Fri Feb 21 04:23:54 2020
New Revision: 358197
URL: https://svnweb.freebsd.org/changeset/base/358197

Log:
  MFC r358069:
  
  strchr() returns a pointer not an int.
  
  Reported by:	bjk
  Approved by:	des (blanket, implicit)

Modified:
  stable/11/lib/libpam/modules/pam_login_access/login_access.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/lib/libpam/modules/pam_login_access/login_access.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/lib/libpam/modules/pam_login_access/login_access.c
==============================================================================
--- stable/11/lib/libpam/modules/pam_login_access/login_access.c	Fri Feb 21 04:22:29 2020	(r358196)
+++ stable/11/lib/libpam/modules/pam_login_access/login_access.c	Fri Feb 21 04:23:54 2020	(r358197)
@@ -220,7 +220,7 @@ from_match(const char *tok, const char *string)
 	    && strcasecmp(tok, string + str_len - tok_len) == 0)
 	    return (YES);
     } else if (strcasecmp(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-all mailing list