From 7a4b1114b1d0bebc3198b5b91d9e6265e7e81ac2 Mon Sep 17 00:00:00 2001 From: Marcelo Araujo Date: Mon, 18 Apr 2016 14:44:01 +0000 Subject: Use NULL instead of 0 for pointers. strchr(3) will return NULL if the character does not appear in the string. MFC after: 2 weeks. --- usr.bin/finger/net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin/finger/net.c') diff --git a/usr.bin/finger/net.c b/usr.bin/finger/net.c index da3a4e1b2fe4..db5f96dd8526 100644 --- a/usr.bin/finger/net.c +++ b/usr.bin/finger/net.c @@ -68,7 +68,7 @@ netfinger(char *name) static struct addrinfo hint; host = strrchr(name, '@'); - if (host == 0) + if (host == NULL) return; *host++ = '\0'; signal(SIGALRM, cleanup); @@ -92,7 +92,7 @@ netfinger(char *name) else printf("[%s]\n", ai0->ai_canonname); - for (ai = ai0; ai != 0; ai = ai->ai_next) { + for (ai = ai0; ai != NULL; ai = ai->ai_next) { if (multi) trying(ai); -- cgit v1.2.3