Re: [PATCH resend] net/sunrpc: Remove uses of NIPQUAD, use %pI4

Joe Perches
2010-03-08T16:14:57Z

On Mon, 2010-03-08 at 10:46 -0500, Chuck Lever wrote:
> Why remove the (void) here, but not in xprtrdma/transport.c? IMO the
> (void) cast should be left in place at all three call sites.

I didn't notice it in xprtrdma/transport.c, otherwise I'd've
removed it there too.

When the result is not used, snprintf is most commonly not
cast at all.

(There's a space and a tab in the brackets of the grep string)

$ grep -rP --include=*.[ch] "^[ ]+snprintf\s*\(" * | wc -l
1301

$ grep -rP --include=*.[ch] "^[ ]+\(\s*void\s*\)\s*snprintf\s*\(" * | wc -l
9

net/sunrpc/ has 7 of those.

I'll get around to submitting patches for all of them.