From 2895f0fd22ce95d1157efc316de661f770a29d07 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Fri, 4 Feb 2022 19:35:36 -0600 Subject: [PATCH] ws2_32: Avoid an unnecessary goto. Signed-off-by: Zebediah Figura Signed-off-by: Alexandre Julliard --- dlls/ws2_32/socket.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 4b3ca3c2507..b06fb341991 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -3305,8 +3305,9 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol, if (!num_startup) { - err = WSANOTINITIALISED; - goto done; + WARN( "not initialised\n" ); + SetLastError( WSANOTINITIALISED ); + return -1; } /* hack for WSADuplicateSocket */ @@ -3406,11 +3407,6 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol, } WSASetLastError(0); return ret; - -done: - WARN("\t\tfailed, error %d!\n", err); - SetLastError(err); - return INVALID_SOCKET; } /*********************************************************************** -- 2.11.4.GIT