svn commit: r311937 - in stable: 10/contrib/ngatm/snmp_atm 11/contrib/ngatm/snmp_atm 9/contrib/ngatm/snmp_atm

Dimitry Andric dim at FreeBSD.org
Wed Jan 11 20:45:28 UTC 2017


Author: dim
Date: Wed Jan 11 20:45:27 2017
New Revision: 311937
URL: https://svnweb.freebsd.org/changeset/base/311937

Log:
  MFC r311649:
  
  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.

Modified:
  stable/9/contrib/ngatm/snmp_atm/snmp_atm.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/contrib/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/contrib/ngatm/snmp_atm/snmp_atm.c
  stable/11/contrib/ngatm/snmp_atm/snmp_atm.c
Directory Properties:
  stable/10/   (props changed)
  stable/11/   (props changed)

Modified: stable/9/contrib/ngatm/snmp_atm/snmp_atm.c
==============================================================================
--- stable/9/contrib/ngatm/snmp_atm/snmp_atm.c	Wed Jan 11 20:29:58 2017	(r311936)
+++ stable/9/contrib/ngatm/snmp_atm/snmp_atm.c	Wed Jan 11 20:45:27 2017	(r311937)
@@ -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;
 	}


More information about the svn-src-stable-9 mailing list