Skip to content

Commit

Permalink
net/sched: fix pointer check in gen_handle
Browse files Browse the repository at this point in the history
Fixes sparse warning about pointer in gen_handle:
net/sched/cls_rsvp.h:392:40: warning: Using plain integer as NULL pointer

Fixes: 8113c09 ("net_sched: use void pointer for filter handle")
Signed-off-by: Josh Hunt <johunt@akamai.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Josh Hunt authored and David S. Miller committed Sep 11, 2017
1 parent 33e34e7 commit 230cfd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sched/cls_rsvp.h
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ static unsigned int gen_handle(struct tcf_proto *tp, unsigned salt)
if ((data->hgenerator += 0x10000) == 0)
data->hgenerator = 0x10000;
h = data->hgenerator|salt;
if (rsvp_get(tp, h) == 0)
if (!rsvp_get(tp, h))
return h;
}
return 0;
Expand Down

0 comments on commit 230cfd2

Please sign in to comment.