Skip to content

Commit

Permalink
net: ethernet: apple: initialize variables directly
Browse files Browse the repository at this point in the history
Clean up the code a bit to initialize the variables directly when
defining them.

Signed-off-by: Emilio López <emilio@elopez.com.ar>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Emilio López authored and David S. Miller committed May 17, 2013
1 parent bfd428d commit 3b0aaef
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/ethernet/apple/bmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1030,14 +1030,12 @@ static void bmac_set_multicast(struct net_device *dev)
rx_cfg |= RxPromiscEnable;
bmwrite(dev, RXCFG, rx_cfg);
} else {
u16 hash_table[4];
u16 hash_table[4] = { 0 };

rx_cfg = bmread(dev, RXCFG);
rx_cfg &= ~RxPromiscEnable;
bmwrite(dev, RXCFG, rx_cfg);

for(i = 0; i < 4; i++) hash_table[i] = 0;

netdev_for_each_mc_addr(ha, dev) {
crc = ether_crc_le(6, ha->addr);
crc >>= 26;
Expand Down

0 comments on commit 3b0aaef

Please sign in to comment.