Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Jan 2017 15:57:12 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r311649 - head/contrib/ngatm/snmp_atm
Message-ID:  <201701071557.v07FvCUD063155@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Sat Jan  7 15:57:12 2017
New Revision: 311649
URL: https://svnweb.freebsd.org/changeset/base/311649

Log:
  Fix the following clang 4.0.0 warning in ngatm's snmp_atm.c:
  
      contrib/ngatm/snmp_atm/snmp_atm.c:173:6: error: logical not is only
      applied to the left hand side of this bitwise operator
      [-Werror,-Wlogical-not-parentheses]
              if (!ifmr.ifm_status & IFM_AVALID) {
                  ^                ~
  
  Obviously, the masking needs to be done before the logical not
  operation.  Add parentheses to make it so.
  
  MFC after:      3 days

Modified:
  head/contrib/ngatm/snmp_atm/snmp_atm.c

Modified: head/contrib/ngatm/snmp_atm/snmp_atm.c
==============================================================================
--- head/contrib/ngatm/snmp_atm/snmp_atm.c	Sat Jan  7 15:18:49 2017	(r311648)
+++ head/contrib/ngatm/snmp_atm/snmp_atm.c	Sat Jan  7 15:57:12 2017	(r311649)
@@ -170,7 +170,7 @@ atmif_check_carrier(struct atmif_priv *a
 		aif->pub.carrier = ATMIF_CARRIER_UNKNOWN;
 		return;
 	}
-	if (!ifmr.ifm_status & IFM_AVALID) {
+	if (!(ifmr.ifm_status & IFM_AVALID)) {
 		aif->pub.carrier = ATMIF_CARRIER_UNKNOWN;
 		return;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701071557.v07FvCUD063155>