Fix shadowing sin()

This commit is contained in:
Stefan Bühler 2008-11-17 09:54:35 +01:00
parent 089ff81dd0
commit 3980885449

View File

@ -174,15 +174,15 @@ int create_sockaddr() {
}
if (opts.port != 0) {
struct sockaddr_in *sin;
sin = g_malloc0(sizeof(struct sockaddr_in));
sin->sin_family = AF_INET;
struct sockaddr_in *s_in;
s_in = g_malloc0(sizeof(struct sockaddr_in));
s_in->sin_family = AF_INET;
if (opts.addr)
sin->sin_addr.s_addr = opts.addr;
s_in->sin_addr.s_addr = opts.addr;
else
sin->sin_addr.s_addr = htonl(INADDR_ANY);
sin->sin_port = htons(opts.port);
data.sockaddr = (struct sockaddr*) sin;
s_in->sin_addr.s_addr = htonl(INADDR_ANY);
s_in->sin_port = htons(opts.port);
data.sockaddr = (struct sockaddr*) s_in;
data.socklen = sizeof(struct sockaddr_in);
} else {
struct sockaddr_un *sun;