Bruno Jesus : ws2_32/tests: Avoid usage of inet_ntoa since its return is static.
Alexandre Julliard
julliard at winehq.org
Mon Apr 2 13:14:49 CDT 2012
Module: wine
Branch: master
Commit: 9f6ce27ede1f7cc544608be504ad04ec533cd45e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9f6ce27ede1f7cc544608be504ad04ec533cd45e
Author: Bruno Jesus <00cpxxx at gmail.com>
Date: Sat Mar 31 17:16:06 2012 -0300
ws2_32/tests: Avoid usage of inet_ntoa since its return is static.
---
dlls/ws2_32/tests/sock.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index f4cc909..cc045ea 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -4504,7 +4504,7 @@ static void test_AcceptEx(void)
struct timeval timeout = {0,10}; /* wait for 10 milliseconds */
int got, conn1, i;
DWORD bytesReturned, connect_time;
- char buffer[1024];
+ char buffer[1024], ipbuffer[32];
OVERLAPPED overlapped;
int iret, localSize = sizeof(struct sockaddr_in), remoteSize = localSize;
BOOL bret;
@@ -4720,15 +4720,17 @@ static void test_AcceptEx(void)
pGetAcceptExSockaddrs(buffer, 2, sizeof(struct sockaddr_in) + 16, sizeof(struct sockaddr_in) + 16,
(struct sockaddr **)&readBindAddress, &localSize,
(struct sockaddr **)&readRemoteAddress, &remoteSize);
+ strcpy( ipbuffer, inet_ntoa(readBindAddress->sin_addr));
ok( readBindAddress->sin_addr.s_addr == bindAddress.sin_addr.s_addr,
"Local socket address is different %s != %s\n",
- inet_ntoa(readBindAddress->sin_addr), inet_ntoa(bindAddress.sin_addr));
+ ipbuffer, inet_ntoa(bindAddress.sin_addr));
ok( readBindAddress->sin_port == bindAddress.sin_port,
"Local socket port is different: %d != %d\n",
readBindAddress->sin_port, bindAddress.sin_port);
+ strcpy( ipbuffer, inet_ntoa(readRemoteAddress->sin_addr));
ok( readRemoteAddress->sin_addr.s_addr == peerAddress.sin_addr.s_addr,
"Remote socket address is different %s != %s\n",
- inet_ntoa(readRemoteAddress->sin_addr), inet_ntoa(peerAddress.sin_addr));
+ ipbuffer, inet_ntoa(peerAddress.sin_addr));
ok( readRemoteAddress->sin_port == peerAddress.sin_port,
"Remote socket port is different: %d != %d\n",
readRemoteAddress->sin_port, peerAddress.sin_port);
More information about the wine-cvs
mailing list