diff options
author | Panagiotis Issaris <takis@issaris.org> | 2006-07-21 17:51:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-07-21 17:51:30 -0400 |
commit | 0da974f4f303a6842516b764507e3c0a03f41e5a (patch) | |
tree | 8872aec792f02040269c6769dd1009b20f71d186 /net/ipv4/udp.c | |
parent | a0ee7c70b22f78593957f99faa06acb4747b8bc0 (diff) |
[NET]: Conversions from kmalloc+memset to k(z|c)alloc.
Signed-off-by: Panagiotis Issaris <takis@issaris.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 9bfcddad695b..f136cec96d95 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -1468,11 +1468,10 @@ static int udp_seq_open(struct inode *inode, struct file *file) | |||
1468 | struct udp_seq_afinfo *afinfo = PDE(inode)->data; | 1468 | struct udp_seq_afinfo *afinfo = PDE(inode)->data; |
1469 | struct seq_file *seq; | 1469 | struct seq_file *seq; |
1470 | int rc = -ENOMEM; | 1470 | int rc = -ENOMEM; |
1471 | struct udp_iter_state *s = kmalloc(sizeof(*s), GFP_KERNEL); | 1471 | struct udp_iter_state *s = kzalloc(sizeof(*s), GFP_KERNEL); |
1472 | 1472 | ||
1473 | if (!s) | 1473 | if (!s) |
1474 | goto out; | 1474 | goto out; |
1475 | memset(s, 0, sizeof(*s)); | ||
1476 | s->family = afinfo->family; | 1475 | s->family = afinfo->family; |
1477 | s->seq_ops.start = udp_seq_start; | 1476 | s->seq_ops.start = udp_seq_start; |
1478 | s->seq_ops.next = udp_seq_next; | 1477 | s->seq_ops.next = udp_seq_next; |