Skip to contentSkip to conversation

bonding: Sparse warnings fix.

PATCH New Luiz Fernando Capitulino 1 participant 1 message Jan 6, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bonding: Sparse warnings fix.

Fixes the following sparse warnings:

drivers/net/bonding/bond_sysfs.c:263:27: warning: Using plain integer as NULL pointer drivers/net/bonding/bond_sysfs.c:998:26: warning: Using plain integer as NULL pointer drivers/net/bonding/bond_sysfs.c:1126:26: warning: Using plain integer as NULL pointer

 drivers/net/bonding/bond_sysfs.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/bonding/bond_sysfs.c +3 -3
index 32d13da..041bcc5 100644
@@ -260,7 +260,7 @@ static ssize_t bonding_store_slaves(stru
 	char *ifname;
 	int i, res, found, ret = count;
 	struct slave *slave;
-	struct net_device *dev = 0;
+	struct net_device *dev = NULL;
 	struct bonding *bond = to_bond(cd);
 
 	/* Quick sanity check -- is the bond interface up? */
@@ -995,7 +995,7 @@ static ssize_t bonding_store_primary(str
 			printk(KERN_INFO DRV_NAME
 			       ": %s: Setting primary slave to None.\n",
 			       bond->dev->name);
-			bond->primary_slave = 0;
+			bond->primary_slave = NULL;
 				bond_select_active_slave(bond);
 		} else {
 			printk(KERN_INFO DRV_NAME
@@ -1123,7 +1123,7 @@ static ssize_t bonding_store_active_slav
 			printk(KERN_INFO DRV_NAME
 			       ": %s: Setting active slave to None.\n",
 			       bond->dev->name);
-			bond->primary_slave = 0;
+			bond->primary_slave = NULL;
 				bond_select_active_slave(bond);
 		} else {
 			printk(KERN_INFO DRV_NAME
Signature · 1 line
Luiz Fernando N. Capitulino