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/tcp_ipv4.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/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index a891133f00e4..f6f39e814291 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -1640,10 +1640,9 @@ static int tcp_seq_open(struct inode *inode, struct file *file) | |||
1640 | if (unlikely(afinfo == NULL)) | 1640 | if (unlikely(afinfo == NULL)) |
1641 | return -EINVAL; | 1641 | return -EINVAL; |
1642 | 1642 | ||
1643 | s = kmalloc(sizeof(*s), GFP_KERNEL); | 1643 | s = kzalloc(sizeof(*s), GFP_KERNEL); |
1644 | if (!s) | 1644 | if (!s) |
1645 | return -ENOMEM; | 1645 | return -ENOMEM; |
1646 | memset(s, 0, sizeof(*s)); | ||
1647 | s->family = afinfo->family; | 1646 | s->family = afinfo->family; |
1648 | s->seq_ops.start = tcp_seq_start; | 1647 | s->seq_ops.start = tcp_seq_start; |
1649 | s->seq_ops.next = tcp_seq_next; | 1648 | s->seq_ops.next = tcp_seq_next; |