svn commit: r298191 - head/usr.bin/talk
Marcelo Araujo
araujo at FreeBSD.org
Mon Apr 18 07:14:02 UTC 2016
Author: araujo
Date: Mon Apr 18 07:14:01 2016
New Revision: 298191
URL: https://svnweb.freebsd.org/changeset/base/298191
Log:
User NULL instead of 0 for pointers.
getservent(3) returns NULL on EOF or error.
MFC after: 2 weeks.
Modified:
head/usr.bin/talk/get_addrs.c
Modified: head/usr.bin/talk/get_addrs.c
==============================================================================
--- head/usr.bin/talk/get_addrs.c Mon Apr 18 07:09:34 2016 (r298190)
+++ head/usr.bin/talk/get_addrs.c Mon Apr 18 07:14:01 2016 (r298191)
@@ -59,7 +59,7 @@ get_addrs(const char *my_machine_name __
err(1, "failed to find my interface address");
/* find the server's port */
sp = getservbyname("ntalk", "udp");
- if (sp == 0)
+ if (sp == NULL)
errx(1, "ntalk/udp: service is not registered");
daemon_port = sp->s_port;
}
More information about the svn-src-head
mailing list