]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r353326:
authorBrooks Davis <brooks@FreeBSD.org>
Tue, 15 Oct 2019 17:30:12 +0000 (17:30 +0000)
committerBrooks Davis <brooks@FreeBSD.org>
Tue, 15 Oct 2019 17:30:12 +0000 (17:30 +0000)
commita7a3ca08b870a50d38dd5ad89ac5d1eab59546ab
tree32f1a4b3bccfd1ad28e061f48ab89bc0b9fa52ca
parent282c21262f7aecdd2f7bb01390ab0144c09b8b2a
MFC r353326:

Fix various -Wpointer-compare warnings

This warning (comparing a pointer against a zero character literal
rather than NULL) has existed since GCC 7.1.0, and was recently added to
Clang trunk.

Almost all of these are harmless, except for fwcontrol's str2node, which
needs to both guard against dereferencing a NULL pointer (though in
practice it appears none of the callers will ever pass one in), as well
as ensure it doesn't parse the empty string as node 0 due to strtol's
awkward interface.

Submitted by: James Clarke <jtrc27@jrtc27.com>
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D21914
contrib/sendmail/mail.local/mail.local.c
lib/libc/tests/nss/getgr_test.c
lib/libc/tests/nss/getproto_test.c
lib/libc/tests/nss/getrpc_test.c
lib/libc/tests/nss/getserv_test.c
usr.bin/tip/tip/acu.c
usr.sbin/fwcontrol/fwcontrol.c