diff mbox series

[net-next] netfilter: nfnetlink_osf: fix using plain integer as NULL warning

Message ID 1533698624-107304-1-git-send-email-weiyongjun1@huawei.com
State Awaiting Upstream, archived
Delegated to: David Miller
Headers show
Series [net-next] netfilter: nfnetlink_osf: fix using plain integer as NULL warning | expand

Commit Message

Wei Yongjun Aug. 8, 2018, 3:23 a.m. UTC
Fixes the following sparse warning:

net/netfilter/nfnetlink_osf.c:274:24: warning:
 Using plain integer as NULL pointer

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 net/netfilter/nfnetlink_osf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Pablo Neira Ayuso Aug. 8, 2018, 5:05 p.m. UTC | #1
On Wed, Aug 08, 2018 at 03:23:44AM +0000, Wei Yongjun wrote:
> Fixes the following sparse warning:
> 
> net/netfilter/nfnetlink_osf.c:274:24: warning:
>  Using plain integer as NULL pointer

Applied, thanks.
diff mbox series

Patch

diff --git a/net/netfilter/nfnetlink_osf.c b/net/netfilter/nfnetlink_osf.c
index f9dba62..00db27d 100644
--- a/net/netfilter/nfnetlink_osf.c
+++ b/net/netfilter/nfnetlink_osf.c
@@ -271,7 +271,7 @@  const char *nf_osf_find(const struct sk_buff *skb,
 
 	tcp = nf_osf_hdr_ctx_init(&ctx, skb, ip, opts);
 	if (!tcp)
-		return false;
+		return NULL;
 
 	list_for_each_entry_rcu(kf, &nf_osf_fingers[ctx.df], finger_entry) {
 		f = &kf->finger;