net/sunrpc: Convert (void)snprintf to snprintf
authorJoe Perches <joe@perches.com>
Mon, 8 Mar 2010 20:15:59 +0000 (12:15 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Mar 2010 20:15:59 +0000 (12:15 -0800)
(Applies on top of "Remove uses of NIPQUAD, use %pI4")

Casts to void of snprintf are most uncommon in kernel source.
9 use casts, 1301 do not.

Remove the remaining uses in net/sunrpc/

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sunrpc/xprtrdma/transport.c
net/sunrpc/xprtsock.c

index 83d339fd66d592f94d0f530005adb751d1fd04c7..f96c2fe6137b87f11d7155d96441600012c984a3 100644 (file)
@@ -160,15 +160,15 @@ xprt_rdma_format_addresses(struct rpc_xprt *xprt)
        (void)rpc_ntop(sap, buf, sizeof(buf));
        xprt->address_strings[RPC_DISPLAY_ADDR] = kstrdup(buf, GFP_KERNEL);
 
-       (void)snprintf(buf, sizeof(buf), "%u", rpc_get_port(sap));
+       snprintf(buf, sizeof(buf), "%u", rpc_get_port(sap));
        xprt->address_strings[RPC_DISPLAY_PORT] = kstrdup(buf, GFP_KERNEL);
 
        xprt->address_strings[RPC_DISPLAY_PROTO] = "rdma";
 
-       (void)snprintf(buf, sizeof(buf), "%08x", ntohl(sin->sin_addr.s_addr));
+       snprintf(buf, sizeof(buf), "%08x", ntohl(sin->sin_addr.s_addr));
        xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = kstrdup(buf, GFP_KERNEL);
 
-       (void)snprintf(buf, sizeof(buf), "%4hx", rpc_get_port(sap));
+       snprintf(buf, sizeof(buf), "%4hx", rpc_get_port(sap));
        xprt->address_strings[RPC_DISPLAY_HEX_PORT] = kstrdup(buf, GFP_KERNEL);
 
        /* netid */
index 86234bcf2e898b9a2b84b3894707ff3c7f6ecae2..4f55ab7ec1b1fdbad401519eda1c68627027e108 100644 (file)
@@ -314,10 +314,10 @@ static void xs_format_common_peer_ports(struct rpc_xprt *xprt)
        struct sockaddr *sap = xs_addr(xprt);
        char buf[128];
 
-       (void)snprintf(buf, sizeof(buf), "%u", rpc_get_port(sap));
+       snprintf(buf, sizeof(buf), "%u", rpc_get_port(sap));
        xprt->address_strings[RPC_DISPLAY_PORT] = kstrdup(buf, GFP_KERNEL);
 
-       (void)snprintf(buf, sizeof(buf), "%4hx", rpc_get_port(sap));
+       snprintf(buf, sizeof(buf), "%4hx", rpc_get_port(sap));
        xprt->address_strings[RPC_DISPLAY_HEX_PORT] = kstrdup(buf, GFP_KERNEL);
 }