diff options
author | Marcelo Araujo <araujo@FreeBSD.org> | 2016-04-18 07:14:01 +0000 |
---|---|---|
committer | Marcelo Araujo <araujo@FreeBSD.org> | 2016-04-18 07:14:01 +0000 |
commit | fffa1bd071a4cc9ed509573c2f9cca2644e80c23 (patch) | |
tree | 5cd423cd3d928d24adac1aa4a23c6426e0a3e578 /usr.bin/talk | |
parent | 1b56693f8b10f0a106862969c65ca9bb77d95f60 (diff) | |
download | src-fffa1bd071a4cc9ed509573c2f9cca2644e80c23.tar.gz src-fffa1bd071a4cc9ed509573c2f9cca2644e80c23.zip |
User NULL instead of 0 for pointers.
getservent(3) returns NULL on EOF or error.
MFC after: 2 weeks.
Notes
Notes:
svn path=/head/; revision=298191
Diffstat (limited to 'usr.bin/talk')
-rw-r--r-- | usr.bin/talk/get_addrs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/talk/get_addrs.c b/usr.bin/talk/get_addrs.c index 526e26fd5761..b2af6855ddbd 100644 --- a/usr.bin/talk/get_addrs.c +++ b/usr.bin/talk/get_addrs.c @@ -59,7 +59,7 @@ get_addrs(const char *my_machine_name __unused, const char *his_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; } |