diff options
author | dim <dim@FreeBSD.org> | 2016-01-03 17:23:16 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2016-01-03 17:23:16 +0000 |
commit | 36078867dffde3cdd37285698540ee19720cc775 (patch) | |
tree | d6ab81822876e49273e45fff327f6834f81d1d7c /contrib | |
parent | dbf2ac57201263e4d0db0d09632f666a71aad3e3 (diff) | |
download | FreeBSD-src-36078867dffde3cdd37285698540ee19720cc775.zip FreeBSD-src-36078867dffde3cdd37285698540ee19720cc775.tar.gz |
MFC r293015:
Merge r293013 from clang380-import branch:
Fix a clang 3.8.0 warning in pflogd.c:
contrib/pf/pflogd/pflogd.c:769:8: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses]
if (!if_exists(interface) == -1) {
^ ~~
The if_exists() function does not return -1, and even if it did, it
would not be the correct way to check. Just ditch the == -1 instead.
Obtained from: OpenBSD's pflogd.c 1.49
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/pf/pflogd/pflogd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/pf/pflogd/pflogd.c b/contrib/pf/pflogd/pflogd.c index 2fc2338..de8d4ac 100644 --- a/contrib/pf/pflogd/pflogd.c +++ b/contrib/pf/pflogd/pflogd.c @@ -766,7 +766,7 @@ main(int argc, char **argv) np = pcap_dispatch(hpcap, PCAP_NUM_PKTS, phandler, (u_char *)dpcap); if (np < 0) { - if (!if_exists(interface) == -1) { + if (!if_exists(interface)) { logmsg(LOG_NOTICE, "interface %s went away", interface); ret = -1; |