Date: Sun, 3 Jan 2016 17:23:16 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r293110 - in stable: 10/contrib/pf/pflogd 9/contrib/pf/pflogd Message-ID: <201601031723.u03HNG5f078405@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Sun Jan 3 17:23:16 2016 New Revision: 293110 URL: https://svnweb.freebsd.org/changeset/base/293110 Log: 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 Modified: stable/10/contrib/pf/pflogd/pflogd.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/contrib/pf/pflogd/pflogd.c Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/pf/ (props changed) Modified: stable/10/contrib/pf/pflogd/pflogd.c ============================================================================== --- stable/10/contrib/pf/pflogd/pflogd.c Sun Jan 3 17:19:17 2016 (r293109) +++ stable/10/contrib/pf/pflogd/pflogd.c Sun Jan 3 17:23:16 2016 (r293110) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601031723.u03HNG5f078405>