Module Name:    src
Committed By:   lukem
Date:           Mon Apr 13 07:04:54 UTC 2009

Modified Files:
        src/usr.bin/rpcinfo: rpcinfo.c

Log Message:
fix -Wshadow issues


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/usr.bin/rpcinfo/rpcinfo.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/rpcinfo/rpcinfo.c
diff -u src/usr.bin/rpcinfo/rpcinfo.c:1.27 src/usr.bin/rpcinfo/rpcinfo.c:1.28
--- src/usr.bin/rpcinfo/rpcinfo.c:1.27	Wed Feb 13 16:15:18 2008
+++ src/usr.bin/rpcinfo/rpcinfo.c	Mon Apr 13 07:04:54 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpcinfo.c,v 1.27 2008/02/13 16:15:18 christos Exp $	*/
+/*	$NetBSD: rpcinfo.c,v 1.28 2009/04/13 07:04:54 lukem Exp $	*/
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -481,7 +481,7 @@
 {
 	struct sockaddr_in server_addr;
 	struct pmaplist *head = NULL;
-	int socket = RPC_ANYSOCK;
+	int sock = RPC_ANYSOCK;
 	struct timeval minutetimeout;
 	register CLIENT *client;
 	struct rpcent *rpc;
@@ -498,7 +498,7 @@
 		get_inet_address(&server_addr, host);
 		server_addr.sin_port = htons(PMAPPORT);
 		client = clnttcp_create(&server_addr, PMAPPROG, PMAPVERS,
-		    &socket, 50, 500);
+		    &sock, 50, 500);
 	} else
 		client = local_rpcb(PMAPPROG, PMAPVERS);
 
@@ -866,14 +866,14 @@
 		printf(
 "   program version(s) netid(s)                         service     owner\n");
 		for (rs = rs_head; rs; rs = rs->next) {
-			char *p = buf;
+			char *bp = buf;
 
 			printf("%10ld  ", rs->prog);
 			for (vl = rs->vlist; vl; vl = vl->next) {
-				sprintf(p, "%d", vl->vers);
-				p = p + strlen(p);
+				sprintf(bp, "%d", vl->vers);
+				bp = bp + strlen(bp);
 				if (vl->next)
-					sprintf(p++, ",");
+					sprintf(bp++, ",");
 			}
 			printf("%-10s", buf);
 			buf[0] = 0;

Reply via email to