From f18976136625a7d016e97bfd9eabddf640b3e06d Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Tue, 8 Oct 2019 21:14:09 +0000 Subject: 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 Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D21914 --- contrib/sendmail/mail.local/mail.local.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib') diff --git a/contrib/sendmail/mail.local/mail.local.c b/contrib/sendmail/mail.local/mail.local.c index 52998e2f7dbb..40387ef06e47 100644 --- a/contrib/sendmail/mail.local/mail.local.c +++ b/contrib/sendmail/mail.local/mail.local.c @@ -393,7 +393,7 @@ main(argc, argv) } /* Non-LMTP from here on out */ - if (*argv == '\0') + if (*argv == NULL) usage(); /* -- cgit v1.2.3