ws2_32(1/3): Remove an unnecessary cast
Juan Lang
juan.lang at gmail.com
Thu Jul 16 12:04:22 CDT 2009
Small cleanups I noticed when looking over Jeff Latimer's patches.
Note to Jeff, I'm not changing any functions you were, I'll stay away
till your patches get in.
--Juan
-------------- next part --------------
From 753003309e56bb9ddf3d2e7463cd3559e6e4b02b Mon Sep 17 00:00:00 2001
From: Juan Lang <juan.lang at gmail.com>
Date: Thu, 16 Jul 2009 08:46:20 -0700
Subject: [PATCH 1/3] Remove an unnecessary cast
---
dlls/ws2_32/socket.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 464e890..88b2b22 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -4936,8 +4936,7 @@ INT WINAPI WSAAddressToStringA( LPSOCKADDR sockaddr, DWORD len,
if (!sockaddr || len < sizeof(SOCKADDR_IN)) return SOCKET_ERROR;
if (!string || !lenstr) return SOCKET_ERROR;
- /* sin_family is guaranteed to be the first u_short */
- switch(((SOCKADDR_IN *)sockaddr)->sin_family)
+ switch(sockaddr->sa_family)
{
case WS_AF_INET:
sprintf( buffer, "%u.%u.%u.%u:%u",
--
1.6.3.2
More information about the wine-patches
mailing list