git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge to kernel-2.6.20-1.2949.fc6.vs2.2.0.1
[linux-2.6.git]
/
net
/
sched
/
cls_tcindex.c
diff --git
a/net/sched/cls_tcindex.c
b/net/sched/cls_tcindex.c
index
9f92117
..
49bb504
100644
(file)
--- a/
net/sched/cls_tcindex.c
+++ b/
net/sched/cls_tcindex.c
@@
-4,7
+4,6
@@
* Written 1998,1999 by Werner Almesberger, EPFL ICA
*/
* Written 1998,1999 by Werner Almesberger, EPFL ICA
*/
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
@@
-149,11
+148,10
@@
static int tcindex_init(struct tcf_proto *tp)
struct tcindex_data *p;
DPRINTK("tcindex_init(tp %p)\n",tp);
struct tcindex_data *p;
DPRINTK("tcindex_init(tp %p)\n",tp);
- p = k
m
alloc(sizeof(struct tcindex_data),GFP_KERNEL);
+ p = k
z
alloc(sizeof(struct tcindex_data),GFP_KERNEL);
if (!p)
return -ENOMEM;
if (!p)
return -ENOMEM;
- memset(p, 0, sizeof(*p));
p->mask = 0xffff;
p->hash = DEFAULT_HASH_SIZE;
p->fall_through = 1;
p->mask = 0xffff;
p->hash = DEFAULT_HASH_SIZE;
p->fall_through = 1;
@@
-247,9
+245,9
@@
tcindex_set_parms(struct tcf_proto *tp, unsigned long base, u32 handle,
}
if (tb[TCA_TCINDEX_SHIFT-1]) {
}
if (tb[TCA_TCINDEX_SHIFT-1]) {
- if (RTA_PAYLOAD(tb[TCA_TCINDEX_SHIFT-1]) < sizeof(
u16
))
+ if (RTA_PAYLOAD(tb[TCA_TCINDEX_SHIFT-1]) < sizeof(
int
))
goto errout;
goto errout;
- cp.shift = *(
u16
*) RTA_DATA(tb[TCA_TCINDEX_SHIFT-1]);
+ cp.shift = *(
int
*) RTA_DATA(tb[TCA_TCINDEX_SHIFT-1]);
}
err = -EBUSY;
}
err = -EBUSY;
@@
-297,16
+295,14
@@
tcindex_set_parms(struct tcf_proto *tp, unsigned long base, u32 handle,
err = -ENOMEM;
if (!cp.perfect && !cp.h) {
if (valid_perfect_hash(&cp)) {
err = -ENOMEM;
if (!cp.perfect && !cp.h) {
if (valid_perfect_hash(&cp)) {
- cp.perfect = k
malloc(cp.hash *
sizeof(*r), GFP_KERNEL);
+ cp.perfect = k
calloc(cp.hash,
sizeof(*r), GFP_KERNEL);
if (!cp.perfect)
goto errout;
if (!cp.perfect)
goto errout;
- memset(cp.perfect, 0, cp.hash * sizeof(*r));
balloc = 1;
} else {
balloc = 1;
} else {
- cp.h = k
malloc(cp.hash *
sizeof(f), GFP_KERNEL);
+ cp.h = k
calloc(cp.hash,
sizeof(f), GFP_KERNEL);
if (!cp.h)
goto errout;
if (!cp.h)
goto errout;
- memset(cp.h, 0, cp.hash * sizeof(f));
balloc = 2;
}
}
balloc = 2;
}
}
@@
-317,10
+313,9
@@
tcindex_set_parms(struct tcf_proto *tp, unsigned long base, u32 handle,
r = tcindex_lookup(&cp, handle) ? : &new_filter_result;
if (r == &new_filter_result) {
r = tcindex_lookup(&cp, handle) ? : &new_filter_result;
if (r == &new_filter_result) {
- f = k
m
alloc(sizeof(*f), GFP_KERNEL);
+ f = k
z
alloc(sizeof(*f), GFP_KERNEL);
if (!f)
goto errout_alloc;
if (!f)
goto errout_alloc;
- memset(f, 0, sizeof(*f));
}
if (tb[TCA_TCINDEX_CLASSID-1]) {
}
if (tb[TCA_TCINDEX_CLASSID-1]) {