diff options
author | Brooks Davis <brooks@FreeBSD.org> | 2019-10-08 21:14:09 +0000 |
---|---|---|
committer | Brooks Davis <brooks@FreeBSD.org> | 2019-10-08 21:14:09 +0000 |
commit | f18976136625a7d016e97bfd9eabddf640b3e06d (patch) | |
tree | 9a4c415888f988d32443cacadb70754b608ebecf /contrib/sendmail | |
parent | cc698b490001646c7174d14af6500400be9bd4ff (diff) | |
download | src-f18976136625a7d016e97bfd9eabddf640b3e06d.tar.gz src-f18976136625a7d016e97bfd9eabddf640b3e06d.zip |
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
Notes
Notes:
svn path=/head/; revision=353326
Diffstat (limited to 'contrib/sendmail')
-rw-r--r-- | contrib/sendmail/mail.local/mail.local.c | 2 |
1 files changed, 1 insertions, 1 deletions
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(); /* |