From owner-svn-src-head@freebsd.org Sat Apr 9 18:09:11 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C3A2B0ABBD; Sat, 9 Apr 2016 18:09:11 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 325491A24; Sat, 9 Apr 2016 18:09:11 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u39I9A2K056529; Sat, 9 Apr 2016 18:09:10 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u39I9Alu056527; Sat, 9 Apr 2016 18:09:10 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201604091809.u39I9Alu056527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 9 Apr 2016 18:09:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297755 - in head/lib/libpam/modules: pam_krb5 pam_login_access X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Apr 2016 18:09:11 -0000 Author: pfg Date: Sat Apr 9 18:09:10 2016 New Revision: 297755 URL: https://svnweb.freebsd.org/changeset/base/297755 Log: libpam: replace 0 with NULL for pointers. Found with devel/coccinelle. Reviewed by: des Modified: head/lib/libpam/modules/pam_krb5/pam_krb5.c head/lib/libpam/modules/pam_login_access/login_access.c Modified: head/lib/libpam/modules/pam_krb5/pam_krb5.c ============================================================================== --- head/lib/libpam/modules/pam_krb5/pam_krb5.c Sat Apr 9 18:08:21 2016 (r297754) +++ head/lib/libpam/modules/pam_krb5/pam_krb5.c Sat Apr 9 18:09:10 2016 (r297755) @@ -860,7 +860,7 @@ verify_krb_v5_tgt(krb5_context context, services[0] = "host"; services[1] = pam_service; services[2] = NULL; - keyblock = 0; + keyblock = NULL; retval = -1; for (service = &services[0]; *service != NULL; service++) { retval = krb5_sname_to_principal(context, NULL, *service, Modified: head/lib/libpam/modules/pam_login_access/login_access.c ============================================================================== --- head/lib/libpam/modules/pam_login_access/login_access.c Sat Apr 9 18:08:21 2016 (r297754) +++ head/lib/libpam/modules/pam_login_access/login_access.c Sat Apr 9 18:09:10 2016 (r297755) @@ -124,7 +124,7 @@ list_match(char *list, const char *item, * the match is affected by any exceptions. */ - for (tok = strtok(list, sep); tok != 0; tok = strtok((char *) 0, sep)) { + for (tok = strtok(list, sep); tok != NULL; tok = strtok((char *) 0, sep)) { if (strcasecmp(tok, "EXCEPT") == 0) /* EXCEPT: give up */ break; if ((match = (*match_fn)(tok, item)) != 0) /* YES */ @@ -135,7 +135,7 @@ list_match(char *list, const char *item, if (match != NO) { while ((tok = strtok((char *) 0, sep)) && strcasecmp(tok, "EXCEPT")) /* VOID */ ; - if (tok == 0 || list_match((char *) 0, item, match_fn) == NO) + if (tok == NULL || list_match((char *) 0, item, match_fn) == NO) return (match); } return (NO);