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

From: Joe Perches
Date: Mon Mar 08 2010 - 11:15:17 EST


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.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/