Author: brooks Date: Wed Nov 27 20:00:44 2019 New Revision: 355139 URL: https://svnweb.freebsd.org/changeset/base/355139
Log: Fix a logic bug when "mask" contains a ?: operator. Newer versions of clang warn that '&' evaluates before '?:'. Reviewed by: markj MFC after: 3 days Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D22573 Modified: head/sys/dev/bwn/if_bwnvar.h Modified: head/sys/dev/bwn/if_bwnvar.h ============================================================================== --- head/sys/dev/bwn/if_bwnvar.h Wed Nov 27 19:57:17 2019 (r355138) +++ head/sys/dev/bwn/if_bwnvar.h Wed Nov 27 20:00:44 2019 (r355139) @@ -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 || \ _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"