From 722fc0acd0be939543544f6eaa66a9750a69d4a0 Mon Sep 17 00:00:00 2001
From: Eric Blake <eblake@redhat.com>
Date: Wed, 27 Apr 2011 09:52:00 -0600
Subject: [PATCH] passfd: avoid compiler warning

Detected on Fedora 13 with -Wshadow.

* lib/passfd.c (sendfd, recvfd): Avoid shadowing names.
Reported by Laine Stump.

Signed-off-by: Eric Blake <eblake@redhat.com>
---
 ChangeLog    | 6 ++++++
 lib/passfd.c | 8 ++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 21ce7d7fd6..f1006b5f9a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-04-27  Eric Blake  <eblake@redhat.com>
+
+	passfd: avoid compiler warning
+	* lib/passfd.c (sendfd, recvfd): Avoid shadowing names.
+	Reported by Laine Stump.
+
 2011-04-27  J.T. Conklin  <jtc@acorntoolworks.com>  (tiny change)
 
 	* gnulib-tool: change "join -a 2" to "join -a2", the latter is
diff --git a/lib/passfd.c b/lib/passfd.c
index a4d8841070..86c73760b5 100644
--- a/lib/passfd.c
+++ b/lib/passfd.c
@@ -43,7 +43,7 @@
 int
 sendfd (int sock, int fd)
 {
-  char send = 0;
+  char byte = 0;
   struct iovec iov;
   struct msghdr msg;
 # ifdef CMSG_FIRSTHDR
@@ -53,7 +53,7 @@ sendfd (int sock, int fd)
 
   /* send at least one char */
   memset (&msg, 0, sizeof msg);
-  iov.iov_base = &send;
+  iov.iov_base = &byte;
   iov.iov_len = 1;
   msg.msg_iov = &iov;
   msg.msg_iovlen = 1;
@@ -100,7 +100,7 @@ sendfd (int sock _GL_UNUSED, int fd _GL_UNUSED)
 int
 recvfd (int sock, int flags)
 {
-  char recv = 0;
+  char byte = 0;
   struct iovec iov;
   struct msghdr msg;
   int fd = -1;
@@ -118,7 +118,7 @@ recvfd (int sock, int flags)
 
   /* send at least one char */
   memset (&msg, 0, sizeof msg);
-  iov.iov_base = &recv;
+  iov.iov_base = &byte;
   iov.iov_len = 1;
   msg.msg_iov = &iov;
   msg.msg_iovlen = 1;
-- 
2.30.2