Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Apr 2016 14:44:01 +0000 (UTC)
From:      Marcelo Araujo <araujo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r298209 - head/usr.bin/finger
Message-ID:  <201604181444.u3IEi1gJ094445@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: araujo
Date: Mon Apr 18 14:44:01 2016
New Revision: 298209
URL: https://svnweb.freebsd.org/changeset/base/298209

Log:
  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.

Modified:
  head/usr.bin/finger/net.c

Modified: head/usr.bin/finger/net.c
==============================================================================
--- head/usr.bin/finger/net.c	Mon Apr 18 14:41:30 2016	(r298208)
+++ head/usr.bin/finger/net.c	Mon Apr 18 14:44:01 2016	(r298209)
@@ -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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604181444.u3IEi1gJ094445>