dpwsockx: Don't use true as a variable name.

Revision 78bdd23406 (Oct 13 2023) introduced "true" as a variable name
in DPWSCB_EnumSessions.

This is a reserved identifier in C++ and recent versions of C and with
GCC 15 going to move to -std=gnu23 (so essentically C23) we'd break.
This commit is contained in:
Gerald Pfeifer 2024-11-18 22:22:56 +01:00 committed by Alexandre Julliard
parent 6301854fd7
commit 245dfb801e
Notes: Alexandre Julliard 2024-11-19 23:21:04 +01:00
Approved-by: Alistair Leslie-Hughes (@alesliehughes)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/wine/merge_requests/6836

View file

@ -516,7 +516,7 @@ static HRESULT WINAPI DPWSCB_EnumSessions( LPDPSP_ENUMSESSIONSDATA data )
DPWS_DATA *dpwsData; DPWS_DATA *dpwsData;
DWORD dpwsDataSize; DWORD dpwsDataSize;
SOCKADDR_IN addr; SOCKADDR_IN addr;
BOOL true = TRUE; BOOL trueflag = TRUE;
SOCKET sock; SOCKET sock;
HRESULT hr; HRESULT hr;
@ -539,8 +539,9 @@ static HRESULT WINAPI DPWSCB_EnumSessions( LPDPSP_ENUMSESSIONSDATA data )
return DPERR_UNAVAILABLE; return DPERR_UNAVAILABLE;
} }
if ( SOCKET_ERROR == setsockopt( sock, SOL_SOCKET, SO_BROADCAST, (const char *) &true, if ( SOCKET_ERROR == setsockopt( sock, SOL_SOCKET, SO_BROADCAST,
sizeof( true ) ) ) (const char *) &trueflag,
sizeof( trueflag ) ) )
{ {
ERR( "setsockopt() failed\n" ); ERR( "setsockopt() failed\n" );
closesocket( sock ); closesocket( sock );