aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2013-04-28 17:30:01 +0100
committerMichael Brown <mcb30@ipxe.org>2013-04-28 17:31:23 +0100
commit4678864ce65d5f3f3ae6399e152448d848bd8027 (patch)
treeec4e90e1c5226759e2d5e130648ab9de801d385c /src
parentb9663b80497d8954a2195789c91ba2f27c8e2d6b (diff)
downloadipxe-4678864ce65d5f3f3ae6399e152448d848bd8027.tar.gz
[build] Fix dubious uses of bitwise operators
Detected by sparse. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src')
-rw-r--r--src/drivers/net/rtl818x/rtl8185_rtl8225.c2
-rw-r--r--src/net/fcoe.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/net/rtl818x/rtl8185_rtl8225.c b/src/drivers/net/rtl818x/rtl8185_rtl8225.c
index 50cc84ad..ae92531c 100644
--- a/src/drivers/net/rtl818x/rtl8185_rtl8225.c
+++ b/src/drivers/net/rtl818x/rtl8185_rtl8225.c
@@ -71,7 +71,7 @@ static void rtl8225_write(struct net80211_device *dev, u8 addr, u16 data)
udelay(10);
for (i = 15; i >= 0; i--) {
- u16 reg = reg80 | !!(bangdata & (1 << i));
+ u16 reg = ( reg80 | ( ( bangdata >> i ) & 1 ) );
if (i & 1)
rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg);
diff --git a/src/net/fcoe.c b/src/net/fcoe.c
index d1130425..e9e404ec 100644
--- a/src/net/fcoe.c
+++ b/src/net/fcoe.c
@@ -1011,7 +1011,7 @@ static void fcoe_expired ( struct retry_timer *timer, int over __unused ) {
/* Increment the timeout counter */
fcoe->timeouts++;
- if ( vlan_can_be_trunk ( fcoe->netdev ) &
+ if ( vlan_can_be_trunk ( fcoe->netdev ) &&
! ( fcoe->flags & FCOE_VLAN_TIMED_OUT ) ) {
/* If we have already found a VLAN, send infrequent