svn commit: r355454 - stable/11/sys/dev/bwn

Brooks Davis brooks at FreeBSD.org
Fri Dec 6 18:15:28 UTC 2019


Author: brooks
Date: Fri Dec  6 18:15:27 2019
New Revision: 355454
URL: https://svnweb.freebsd.org/changeset/base/355454

Log:
  MFC r355139:
  
  Fix a logic bug when "mask" contains a ?: operator.
  
  Newer versions of clang warn that '&' evaluates before '?:'.
  
  Reviewed by:	markj
  Sponsored by:	DARPA, AFRL
  Differential Revision:	https://reviews.freebsd.org/D22573

Modified:
  stable/11/sys/dev/bwn/if_bwnvar.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/bwn/if_bwnvar.h
==============================================================================
--- stable/11/sys/dev/bwn/if_bwnvar.h	Fri Dec  6 17:58:27 2019	(r355453)
+++ stable/11/sys/dev/bwn/if_bwnvar.h	Fri Dec  6 18:15:27 2019	(r355454)
@@ -125,7 +125,7 @@ struct bwn_mac;
 		mac->mac_phy.phy_maskset(mac, offset, mask, 0);		\
 	} else								\
 		BWN_PHY_WRITE(mac, offset,				\
-		    BWN_PHY_READ(mac, offset) & mask);			\
+		    BWN_PHY_READ(mac, offset) & (mask));		\
 } while (0)
 #define	BWN_PHY_COPY(mac, dst, src)	do {				\
 	KASSERT(mac->mac_status < BWN_MAC_STATUS_INITED ||		\


More information about the svn-src-all mailing list