[PATCH] af_packet: Quiet sparse noise about using plain integer as NULL pointer

Subsystems: networking [general], packet sockets, the rest

STALE5110d

2 messages, 2 authors, 2012-08-08 · open the first message on its own page

[PATCH] af_packet: Quiet sparse noise about using plain integer as NULL pointer

From: Ying Xue <hidden>
Date: 2012-08-07 02:27:02

Quiets the sparse warning:
warning: Using plain integer as NULL pointer

Signed-off-by: Ying Xue <redacted>
---
 net/packet/af_packet.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index ceaca7c..f016f66 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1079,7 +1079,7 @@ static void *packet_current_rx_frame(struct packet_sock *po,
 	default:
 		WARN(1, "TPACKET version not supported\n");
 		BUG();
-		return 0;
+		return NULL;
 	}
 }
 
-- 
1.7.1

Re: [PATCH] af_packet: Quiet sparse noise about using plain integer as NULL pointer

From: David Miller <davem@davemloft.net>
Date: 2012-08-08 22:43:40

From: Ying Xue <redacted>
Date: Tue, 7 Aug 2012 10:27:10 +0800
Quiets the sparse warning:
warning: Using plain integer as NULL pointer

Signed-off-by: Ying Xue <redacted>
Applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help