libpam: replace 0 with NULL for pointers.

Found with devel/coccinelle.

Reviewed by:	des
This commit is contained in:
Pedro F. Giffuni 2016-04-09 18:09:10 +00:00
parent 3cd7f4295f
commit d18146c299
2 changed files with 3 additions and 3 deletions

View File

@ -860,7 +860,7 @@ verify_krb_v5_tgt(krb5_context context, krb5_ccache ccache,
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,

View File

@ -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);