svn commit: r293015 - head/contrib/pf/pflogd

Dimitry Andric dim at FreeBSD.org
Thu Dec 31 22:52:12 UTC 2015


Author: dim
Date: Thu Dec 31 22:52:11 2015
New Revision: 293015
URL: https://svnweb.freebsd.org/changeset/base/293015

Log:
  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
  MFC after:	3 days

Modified:
  head/contrib/pf/pflogd/pflogd.c
Directory Properties:
  head/   (props changed)
  head/contrib/pf/   (props changed)

Modified: head/contrib/pf/pflogd/pflogd.c
==============================================================================
--- head/contrib/pf/pflogd/pflogd.c	Thu Dec 31 22:48:46 2015	(r293014)
+++ head/contrib/pf/pflogd/pflogd.c	Thu Dec 31 22:52:11 2015	(r293015)
@@ -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;


More information about the svn-src-all mailing list