From f7862a87d0e5e05024fe0399f091c616c748cccc Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 31 Dec 2015 22:45:00 +0000 Subject: [PATCH] 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 MFC after: 3 days --- contrib/pf/pflogd/pflogd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/pf/pflogd/pflogd.c b/contrib/pf/pflogd/pflogd.c index 2fc2338da4b..de8d4acfa58 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;