Browse Source

[build] Fix dubious uses of bitwise operators

Detected by sparse.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 11 years ago
parent
commit
4678864ce6
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      src/drivers/net/rtl818x/rtl8185_rtl8225.c
  2. 1
    1
      src/net/fcoe.c

+ 1
- 1
src/drivers/net/rtl818x/rtl8185_rtl8225.c View File

71
 	udelay(10);
71
 	udelay(10);
72
 
72
 
73
 	for (i = 15; i >= 0; i--) {
73
 	for (i = 15; i >= 0; i--) {
74
-		u16 reg = reg80 | !!(bangdata & (1 << i));
74
+		u16 reg = ( reg80 | ( ( bangdata >> i ) & 1 ) );
75
 
75
 
76
 		if (i & 1)
76
 		if (i & 1)
77
 			rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg);
77
 			rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg);

+ 1
- 1
src/net/fcoe.c View File

1011
 	/* Increment the timeout counter */
1011
 	/* Increment the timeout counter */
1012
 	fcoe->timeouts++;
1012
 	fcoe->timeouts++;
1013
 
1013
 
1014
-	if ( vlan_can_be_trunk ( fcoe->netdev ) &
1014
+	if ( vlan_can_be_trunk ( fcoe->netdev ) &&
1015
 	     ! ( fcoe->flags & FCOE_VLAN_TIMED_OUT ) ) {
1015
 	     ! ( fcoe->flags & FCOE_VLAN_TIMED_OUT ) ) {
1016
 
1016
 
1017
 		/* If we have already found a VLAN, send infrequent
1017
 		/* If we have already found a VLAN, send infrequent

Loading…
Cancel
Save