Skip to contentSkip to conversation

bcm63xx: zero initialize mac_addr_used.

PATCH In review Florian Fainelli 2 participants 2 messages May 31, 2009 – Jun 1, 2009 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 6/10 bcm63xx: zero initialize mac_addr_used.

This patch initializes mac_addr_used to zero, the checks against it later would not work properly.

---

arch/mips/bcm63xx/boards/board_bcm963xx.c +1 -1
index 78a40e7..298804a 100644
@@ -32,7 +32,7 @@
 #define PFX	"board_bcm963xx: "
 
 static struct bcm963xx_nvram nvram;
-static unsigned int mac_addr_used;
+static unsigned int mac_addr_used = 0;
 static struct board_info board;
 
 /*
#1 lore raw
Quoted 11 lines · Florian Fainelli

This patch initializes mac_addr_used to zero, the checks against it later would not work properly.

---

arch/mips/bcm63xx/boards/board_bcm963xx.c +0 -0
index 78a40e7..298804a 100644

arch/mips/bcm63xx/boards/board_bcm963xx.c line 35

Quoted 5 lines
arch/mips/bcm63xx/boards/board_bcm963xx.c +1 -1
@@ -32,7 +32,7 @@
 #define PFX	"board_bcm963xx: "
 
 static struct bcm963xx_nvram nvram;
-static unsigned int mac_addr_used;
+static unsigned int mac_addr_used = 0;

Ditto - the variable defaults to zero. Explicit initialization however will inflate the .data section. Dropped.

Ralf