Bruno Jesus : iphlpapi/tests: Avoid ntoa() twice in function call as it returns same pointer.
Alexandre Julliard
julliard at winehq.org
Wed Jan 25 13:18:53 CST 2017
Module: wine
Branch: master
Commit: 76644a7c26f2c2b3a5968665c349b45bdb294387
URL: http://source.winehq.org/git/wine.git/?a=commit;h=76644a7c26f2c2b3a5968665c349b45bdb294387
Author: Bruno Jesus <00cpxxx at gmail.com>
Date: Wed Jan 25 15:33:00 2017 -0200
iphlpapi/tests: Avoid ntoa() twice in function call as it returns same pointer.
Signed-off-by: Bruno Jesus <00cpxxx at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/iphlpapi/tests/iphlpapi.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/iphlpapi/tests/iphlpapi.c b/dlls/iphlpapi/tests/iphlpapi.c
index cb73a9d..64d03cf 100644
--- a/dlls/iphlpapi/tests/iphlpapi.c
+++ b/dlls/iphlpapi/tests/iphlpapi.c
@@ -1598,9 +1598,12 @@ static void test_AllocateAndGetTcpExTableFromStack(void)
trace( "AllocateAndGetTcpExTableFromStack table: %u entries\n", table_ex->dwNumEntries );
for (i = 0; i < table_ex->dwNumEntries; i++)
{
+ char remote_ip[16];
+
+ strcpy(remote_ip, ntoa(table_ex->table[i].dwRemoteAddr));
trace( "%u: local %s:%u remote %s:%u state %u pid %u\n", i,
ntoa(table_ex->table[i].dwLocalAddr), ntohs(table_ex->table[i].dwLocalPort),
- ntoa( table_ex->table[i].dwRemoteAddr ), ntohs(table_ex->table[i].dwRemotePort),
+ remote_ip, ntohs(table_ex->table[i].dwRemotePort),
U(table_ex->table[i]).dwState, table_ex->table[i].dwOwningPid );
}
}
More information about the wine-cvs
mailing list