[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Re: (try 2) ws2_32: getsockname should fail for unbound sockets
From: "Dmitry Timoshkov" <dmitry () codeweavers ! com>
Date: 2007-05-31 4:09:51
Message-ID: 003a01c7a339$9464dd10$6700a8c0 () DMITRY
[Download RAW message or body]
"Damjan Jovanovic" <damjan.jov@gmail.com> wrote:
> + case AF_INET6:
> + {
> + static const struct sockaddr_in6 emptyAddr;
> + const struct sockaddr_in6 *in6 = (struct sockaddr_in6*) uaddr;
> + return in6->sin6_port || memcmp(&in6->sin6_addr, &emptyAddr.sin6_addr, \
> sizeof(struct in6_addr)); + }
> + case AF_INET:
> + {
> + static const struct sockaddr_in emptyAddr;
> + const struct sockaddr_in *in = (struct sockaddr_in*) uaddr;
> + return in->sin_port || memcmp(&in->sin_addr, &emptyAddr.sin_addr, \
> sizeof(struct in_addr)); + }
You should add 'const' to the casting if the target you create is 'const'.
--
Dmitry.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic