diff options
author | Josh Hunt <johunt@akamai.com> | 2017-09-10 15:48:50 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-09-11 14:34:52 -0700 |
commit | 230cfd2dbc228a6992287d31c5d93bc6c2552024 (patch) | |
tree | 953d1166a34698b59bb41047e4f857aed182aa79 /net | |
parent | 33e34e735fd4227b49735f1fc059dc9646abd1c6 (diff) |
net/sched: fix pointer check in gen_handle
Fixes sparse warning about pointer in gen_handle:
net/sched/cls_rsvp.h:392:40: warning: Using plain integer as NULL pointer
Fixes: 8113c095672f6 ("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>
Diffstat (limited to 'net')
-rw-r--r-- | net/sched/cls_rsvp.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/cls_rsvp.h b/net/sched/cls_rsvp.h index 98c05db85bcb..b1f6ed48bc72 100644 --- a/net/sched/cls_rsvp.h +++ b/net/sched/cls_rsvp.h @@ -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; |