projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e2cbc11
)
batman-adv: Use kzalloc rather than kmalloc followed by memset with 0
author
Sven Eckelmann
<sven@narfation.org>
Tue, 10 May 2011 09:17:40 +0000
(11:17 +0200)
committer
Sven Eckelmann
<sven@narfation.org>
Mon, 30 May 2011 05:39:28 +0000
(07:39 +0200)
Signed-off-by: Sven Eckelmann <sven@narfation.org>
net/batman-adv/gateway_client.c
patch
|
blob
|
history
diff --git
a/net/batman-adv/gateway_client.c
b/net/batman-adv/gateway_client.c
index 61605a0f3f39464b8e87a7512c97caf23de59504..6e036351dc3d1f1de41570a118176ed629ab5cd4 100644
(file)
--- a/
net/batman-adv/gateway_client.c
+++ b/
net/batman-adv/gateway_client.c
@@
-273,11
+273,10
@@
static void gw_node_add(struct bat_priv *bat_priv,
struct gw_node *gw_node;
int down, up;
- gw_node = k
m
alloc(sizeof(struct gw_node), GFP_ATOMIC);
+ gw_node = k
z
alloc(sizeof(struct gw_node), GFP_ATOMIC);
if (!gw_node)
return;
- memset(gw_node, 0, sizeof(struct gw_node));
INIT_HLIST_NODE(&gw_node->list);
gw_node->orig_node = orig_node;
atomic_set(&gw_node->refcount, 1);