@@ -68,7 +68,7 @@ static int fw_classify(struct sk_buff *skb, const struct tcf_proto *tp,
int r;
u32 id = skb->mark;
- if (head != NULL) {
+ if (head) {
id &= head->mask;
for (f = rcu_dereference_bh(head->ht[fw_hash(id)]); f;
@@ -106,7 +106,7 @@ static void *fw_get(struct tcf_proto *tp, u32 handle)
struct fw_head *head = rtnl_dereference(tp->root);
struct fw_filter *f;
- if (head == NULL)
+ if (!head)
return NULL;
f = rtnl_dereference(head->ht[fw_hash(handle)]);
@@ -149,7 +149,7 @@ static void fw_destroy(struct tcf_proto *tp)
struct fw_filter *f;
int h;
- if (head == NULL)
+ if (!head)
return;
for (h = 0; h < HTSIZE; h++) {
@@ -172,7 +172,7 @@ static int fw_delete(struct tcf_proto *tp, void *arg, bool *last)
int ret = -EINVAL;
int h;
- if (head == NULL || f == NULL)
+ if (!head || !f)
goto out;
fp = &head->ht[fw_hash(f->id)];
@@ -324,7 +324,7 @@ static int fw_change(struct net *net, struct sk_buff *in_skb,
}
f = kzalloc(sizeof(*f), GFP_KERNEL);
- if (f == NULL)
+ if (!f)
return -ENOBUFS;
err = tcf_exts_init(&f->exts, TCA_FW_ACT, TCA_FW_POLICE);
@@ -354,7 +354,7 @@ static void fw_walk(struct tcf_proto *tp, struct tcf_walker *arg)
struct fw_head *head = rtnl_dereference(tp->root);
int h;
- if (head == NULL)
+ if (!head)
arg->stop = 1;
if (arg->stop)
@@ -385,7 +385,7 @@ static int fw_dump(struct net *net, struct tcf_proto *tp, void *fh,
struct fw_filter *f = fh;
struct nlattr *nest;
- if (f == NULL)
+ if (!f)
return skb->len;
t->tcm_handle = f->id;
@@ -394,7 +394,7 @@ static int fw_dump(struct net *net, struct tcf_proto *tp, void *fh,
return skb->len;
nest = nla_nest_start(skb, TCA_OPTIONS);
- if (nest == NULL)
+ if (!nest)
goto nla_put_failure;
if (f->res.classid &&