aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-02-05 10:20:46 +0000
committerEric Wong <normalperson@yhbt.net>2008-02-05 10:20:46 +0000
commit5915fe55c0a2e2e3e5ddf079d4d4eb5ece97c0e2 (patch)
treebb1db2c4138e72656244f97fd22640704bf162f9 /src
parent77e3283973c0703a16448889c176d81695c73cc7 (diff)
downloadmpd-5915fe55c0a2e2e3e5ddf079d4d4eb5ece97c0e2.tar.gz
mpd-5915fe55c0a2e2e3e5ddf079d4d4eb5ece97c0e2.tar.xz
mpd-5915fe55c0a2e2e3e5ddf079d4d4eb5ece97c0e2.zip
listen.c: fix shadow warning here
git-svn-id: https://svn.musicpd.org/mpd/trunk@7182 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/listen.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/listen.c b/src/listen.c
index 91813b4b8..e2b55a5d3 100644
--- a/src/listen.c
+++ b/src/listen.c
@@ -124,7 +124,7 @@ static void parseListenConfigParam(unsigned int port, ConfigParam * param)
{
struct sockaddr *addrp;
socklen_t addrlen;
- struct sockaddr_in sin;
+ struct sockaddr_in sin4;
#ifdef HAVE_IPV6
struct sockaddr_in6 sin6;
int useIpv6 = ipv6Supported();
@@ -133,9 +133,9 @@ static void parseListenConfigParam(unsigned int port, ConfigParam * param)
sin6.sin6_port = htons(port);
sin6.sin6_family = AF_INET6;
#endif
- memset(&sin, 0, sizeof(struct sockaddr_in));
- sin.sin_port = htons(port);
- sin.sin_family = AF_INET;
+ memset(&sin4, 0, sizeof(struct sockaddr_in));
+ sin4.sin_port = htons(port);
+ sin4.sin_family = AF_INET;
if (!param || 0 == strcmp(param->value, "any")) {
DEBUG("binding to any address\n");
@@ -148,8 +148,8 @@ static void parseListenConfigParam(unsigned int port, ConfigParam * param)
BINDERROR();
}
#endif
- sin.sin_addr.s_addr = INADDR_ANY;
- addrp = (struct sockaddr *)&sin;
+ sin4.sin_addr.s_addr = INADDR_ANY;
+ addrp = (struct sockaddr *)&sin4;
addrlen = sizeof(struct sockaddr_in);
#ifdef HAVE_IPV6
if ((establishListen(port, addrp, addrlen) < 0) && !useIpv6) {
@@ -180,9 +180,9 @@ static void parseListenConfigParam(unsigned int port, ConfigParam * param)
break;
#endif
case AF_INET:
- memcpy((char *)&sin.sin_addr.s_addr,
+ memcpy((char *)&sin4.sin_addr.s_addr,
(char *)he->h_addr, he->h_length);
- addrp = (struct sockaddr *)&sin;
+ addrp = (struct sockaddr *)&sin4;
addrlen = sizeof(struct sockaddr_in);
break;
default: