Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / net / sched / cls_rsvp.h
index 572f06b..6e230ec 100644 (file)
@@ -65,7 +65,6 @@
    Well, as result, despite its simplicity, we get a pretty
    powerful classification engine.  */
 
-#include <linux/config.h>
 
 struct rsvp_head
 {
@@ -241,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;
        }
@@ -447,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;
@@ -533,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) {