svn commit: r355453 - stable/12/sys/dev/bwn

Brooks Davis brooks at FreeBSD.org
Fri Dec 6 17:58:28 UTC 2019


Author: brooks
Date: Fri Dec  6 17:58:27 2019
New Revision: 355453
URL: https://svnweb.freebsd.org/changeset/base/355453

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/12/sys/dev/bwn/if_bwnvar.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/bwn/if_bwnvar.h
==============================================================================
--- stable/12/sys/dev/bwn/if_bwnvar.h	Fri Dec  6 16:53:42 2019	(r355452)
+++ stable/12/sys/dev/bwn/if_bwnvar.h	Fri Dec  6 17:58:27 2019	(r355453)
@@ -129,7 +129,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