diff options
author | David S. Miller <davem@davemloft.net> | 2011-04-28 17:31:47 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-29 01:26:00 -0400 |
commit | cf91166223772ef4a2ed98b9874958bf6a2470df (patch) | |
tree | f8c86cc60798db9e4469031a8dceb5fcb512fb81 /net/decnet/dn_route.c | |
parent | 5c1e6aa300a7a669dc469d2dcb20172c6bd8fed9 (diff) |
net: Use non-zero allocations in dst_alloc().
Make dst_alloc() and it's users explicitly initialize the entire
entry.
The zero'ing done by kmem_cache_zalloc() was almost entirely
redundant.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/decnet/dn_route.c')
-rw-r--r-- | net/decnet/dn_route.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index f489b081c25d..74544bc6fdec 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
@@ -1129,6 +1129,7 @@ make_route: | |||
1129 | if (rt == NULL) | 1129 | if (rt == NULL) |
1130 | goto e_nobufs; | 1130 | goto e_nobufs; |
1131 | 1131 | ||
1132 | memset(&rt->fld, 0, sizeof(rt->fld)); | ||
1132 | rt->fld.saddr = oldflp->saddr; | 1133 | rt->fld.saddr = oldflp->saddr; |
1133 | rt->fld.daddr = oldflp->daddr; | 1134 | rt->fld.daddr = oldflp->daddr; |
1134 | rt->fld.flowidn_oif = oldflp->flowidn_oif; | 1135 | rt->fld.flowidn_oif = oldflp->flowidn_oif; |
@@ -1398,6 +1399,7 @@ make_route: | |||
1398 | if (rt == NULL) | 1399 | if (rt == NULL) |
1399 | goto e_nobufs; | 1400 | goto e_nobufs; |
1400 | 1401 | ||
1402 | memset(&rt->fld, 0, sizeof(rt->fld)); | ||
1401 | rt->rt_saddr = fld.saddr; | 1403 | rt->rt_saddr = fld.saddr; |
1402 | rt->rt_daddr = fld.daddr; | 1404 | rt->rt_daddr = fld.daddr; |
1403 | rt->rt_gateway = fld.daddr; | 1405 | rt->rt_gateway = fld.daddr; |