From a839455bb0862d763eaa2cfb5b1ac4e7ada2a992 Mon Sep 17 00:00:00 2001 From: Andrew Talbot Date: Mon, 24 Mar 2008 15:45:30 +0000 Subject: [PATCH] ws2_32: Assign to structs instead of using memcpy. --- dlls/ws2_32/protocol.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dlls/ws2_32/protocol.c b/dlls/ws2_32/protocol.c index 7cccecb4cc6..43bf424c00c 100644 --- a/dlls/ws2_32/protocol.c +++ b/dlls/ws2_32/protocol.c @@ -99,7 +99,7 @@ static INT WINSOCK_EnterSingleProtocolW( INT protocol, WSAPROTOCOL_INFOW* info ) info->dwServiceFlags1 = XP1_PARTIAL_MESSAGE | XP1_EXPEDITED_DATA | XP1_GRACEFUL_CLOSE | XP1_GUARANTEED_ORDER | XP1_GUARANTEED_DELIVERY; - memcpy( &info->ProviderId, &ProviderIdIP, sizeof(GUID) ); + info->ProviderId = ProviderIdIP; info->dwCatalogEntryId = 0x3e9; info->ProtocolChain.ChainLen = 1; info->iVersion = 2; @@ -114,7 +114,7 @@ static INT WINSOCK_EnterSingleProtocolW( INT protocol, WSAPROTOCOL_INFOW* info ) info->dwServiceFlags1 = XP1_PARTIAL_MESSAGE | XP1_SUPPORT_BROADCAST | XP1_SUPPORT_MULTIPOINT | XP1_MESSAGE_ORIENTED | XP1_CONNECTIONLESS; - memcpy( &info->ProviderId, &ProviderIdIP, sizeof(GUID) ); + info->ProviderId = ProviderIdIP; info->dwCatalogEntryId = 0x3ea; info->ProtocolChain.ChainLen = 1; info->iVersion = 2; @@ -130,7 +130,7 @@ static INT WINSOCK_EnterSingleProtocolW( INT protocol, WSAPROTOCOL_INFOW* info ) info->dwServiceFlags1 = XP1_PARTIAL_MESSAGE | XP1_SUPPORT_BROADCAST | XP1_SUPPORT_MULTIPOINT | XP1_MESSAGE_ORIENTED | XP1_CONNECTIONLESS; - memcpy( &info->ProviderId, &ProviderIdIPX, sizeof(GUID) ); + info->ProviderId = ProviderIdIPX; info->dwCatalogEntryId = 0x406; info->ProtocolChain.ChainLen = 1; info->iVersion = 2; @@ -147,7 +147,7 @@ static INT WINSOCK_EnterSingleProtocolW( INT protocol, WSAPROTOCOL_INFOW* info ) info->dwServiceFlags1 = XP1_IFS_HANDLES | XP1_PSEUDO_STREAM | XP1_MESSAGE_ORIENTED | XP1_GUARANTEED_ORDER | XP1_GUARANTEED_DELIVERY; - memcpy( &info->ProviderId, &ProviderIdSPX, sizeof(GUID) ); + info->ProviderId = ProviderIdSPX; info->dwCatalogEntryId = 0x407; info->ProtocolChain.ChainLen = 1; info->iVersion = 2; @@ -163,7 +163,7 @@ static INT WINSOCK_EnterSingleProtocolW( INT protocol, WSAPROTOCOL_INFOW* info ) info->dwServiceFlags1 = XP1_IFS_HANDLES | XP1_GRACEFUL_CLOSE | XP1_PSEUDO_STREAM | XP1_MESSAGE_ORIENTED | XP1_GUARANTEED_ORDER | XP1_GUARANTEED_DELIVERY; - memcpy( &info->ProviderId, &ProviderIdSPX, sizeof(GUID) ); + info->ProviderId = ProviderIdSPX; info->dwCatalogEntryId = 0x409; info->ProtocolChain.ChainLen = 1; info->iVersion = 2; @@ -203,7 +203,7 @@ static INT WINSOCK_EnterSingleProtocolA( INT protocol, WSAPROTOCOL_INFOA* info ) info->dwServiceFlags1 = XP1_IFS_HANDLES | XP1_EXPEDITED_DATA | XP1_GRACEFUL_CLOSE | XP1_GUARANTEED_ORDER | XP1_GUARANTEED_DELIVERY; - memcpy( &info->ProviderId, &ProviderIdIP, sizeof(GUID) ); + info->ProviderId = ProviderIdIP; info->dwCatalogEntryId = 0x3e9; info->ProtocolChain.ChainLen = 1; info->iVersion = 2; @@ -218,7 +218,7 @@ static INT WINSOCK_EnterSingleProtocolA( INT protocol, WSAPROTOCOL_INFOA* info ) info->dwServiceFlags1 = XP1_IFS_HANDLES | XP1_SUPPORT_BROADCAST | XP1_SUPPORT_MULTIPOINT | XP1_MESSAGE_ORIENTED | XP1_CONNECTIONLESS; - memcpy( &info->ProviderId, &ProviderIdIP, sizeof(GUID) ); + info->ProviderId = ProviderIdIP; info->dwCatalogEntryId = 0x3ea; info->ProtocolChain.ChainLen = 1; info->iVersion = 2; @@ -234,7 +234,7 @@ static INT WINSOCK_EnterSingleProtocolA( INT protocol, WSAPROTOCOL_INFOA* info ) info->dwServiceFlags1 = XP1_IFS_HANDLES | XP1_SUPPORT_BROADCAST | XP1_SUPPORT_MULTIPOINT | XP1_MESSAGE_ORIENTED | XP1_CONNECTIONLESS; - memcpy( &info->ProviderId, &ProviderIdIPX, sizeof(GUID) ); + info->ProviderId = ProviderIdIPX; info->dwCatalogEntryId = 0x406; info->ProtocolChain.ChainLen = 1; info->iVersion = 2; @@ -251,7 +251,7 @@ static INT WINSOCK_EnterSingleProtocolA( INT protocol, WSAPROTOCOL_INFOA* info ) info->dwServiceFlags1 = XP1_IFS_HANDLES | XP1_PSEUDO_STREAM | XP1_MESSAGE_ORIENTED | XP1_GUARANTEED_ORDER | XP1_GUARANTEED_DELIVERY; - memcpy( &info->ProviderId, &ProviderIdSPX, sizeof(GUID) ); + info->ProviderId = ProviderIdSPX; info->dwCatalogEntryId = 0x407; info->ProtocolChain.ChainLen = 1; info->iVersion = 2; @@ -267,7 +267,7 @@ static INT WINSOCK_EnterSingleProtocolA( INT protocol, WSAPROTOCOL_INFOA* info ) info->dwServiceFlags1 = XP1_IFS_HANDLES | XP1_GRACEFUL_CLOSE | XP1_PSEUDO_STREAM | XP1_MESSAGE_ORIENTED | XP1_GUARANTEED_ORDER | XP1_GUARANTEED_DELIVERY; - memcpy( &info->ProviderId, &ProviderIdSPX, sizeof(GUID) ); + info->ProviderId = ProviderIdSPX; info->dwCatalogEntryId = 0x409; info->ProtocolChain.ChainLen = 1; info->iVersion = 2; -- 2.11.4.GIT