summaryrefslogtreecommitdiff
path: root/net/sched/cls_rsvp.h
diff options
context:
space:
mode:
authorPanagiotis Issaris <takis@issaris.org>2006-07-22 01:51:30 +0400
committerDavid S. Miller <davem@davemloft.net>2006-07-22 01:51:30 +0400
commit0da974f4f303a6842516b764507e3c0a03f41e5a (patch)
tree8872aec792f02040269c6769dd1009b20f71d186 /net/sched/cls_rsvp.h
parenta0ee7c70b22f78593957f99faa06acb4747b8bc0 (diff)
downloadlinux-0da974f4f303a6842516b764507e3c0a03f41e5a.tar.xz
[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/sched/cls_rsvp.h')
-rw-r--r--net/sched/cls_rsvp.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/net/sched/cls_rsvp.h b/net/sched/cls_rsvp.h
index ba8741971629..6e230ecfba05 100644
--- a/net/sched/cls_rsvp.h
+++ b/net/sched/cls_rsvp.h
@@ -240,9 +240,8 @@ static int rsvp_init(struct tcf_proto *tp)
{
struct rsvp_head *data;
- data = kmalloc(sizeof(struct rsvp_head), GFP_KERNEL);
+ data = kzalloc(sizeof(struct rsvp_head), GFP_KERNEL);
if (data) {
- memset(data, 0, sizeof(struct rsvp_head));
tp->root = data;
return 0;
}
@@ -446,11 +445,10 @@ static int rsvp_change(struct tcf_proto *tp, unsigned long base,
goto errout2;
err = -ENOBUFS;
- f = kmalloc(sizeof(struct rsvp_filter), GFP_KERNEL);
+ f = kzalloc(sizeof(struct rsvp_filter), GFP_KERNEL);
if (f == NULL)
goto errout2;
- memset(f, 0, sizeof(*f));
h2 = 16;
if (tb[TCA_RSVP_SRC-1]) {
err = -EINVAL;
@@ -532,10 +530,9 @@ insert:
/* No session found. Create new one. */
err = -ENOBUFS;
- s = kmalloc(sizeof(struct rsvp_session), GFP_KERNEL);
+ s = kzalloc(sizeof(struct rsvp_session), GFP_KERNEL);
if (s == NULL)
goto errout;
- memset(s, 0, sizeof(*s));
memcpy(s->dst, dst, sizeof(s->dst));
if (pinfo) {