Subject: [PATCH] - Fixes sparse warning in ipv6/ipv6_sockglue.c

Hi,

The patch below fixes the following sparse warning:

net/ipv6/ipv6_sockglue.c:291:13: warning: Using plain integer as NULL pointer

Signed-off-by: Luiz Capitulino <[email protected]>

net/ipv6/ipv6_sockglue.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -287,7 +287,7 @@ int ipv6_setsockopt(struct sock *sk, int
{
struct ipv6_txoptions *opt;
if (optlen == 0)
- optval = 0;
+ optval = NULL;

/* hop-by-hop / destination options are privileged option */
retv = -EPERM;


--
Luiz Fernando N. Capitulino


2005-11-15 05:43:44

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] - Fixes sparse warning in ipv6/ipv6_sockglue.c

From: Luiz Fernando Capitulino <[email protected]>
Date: Mon, 14 Nov 2005 09:54:22 -0200

> The patch below fixes the following sparse warning:
>
> net/ipv6/ipv6_sockglue.c:291:13: warning: Using plain integer as NULL pointer
>
> Signed-off-by: Luiz Capitulino <[email protected]>

Applied, thanks.