Zebediah Figura : ws2_32: Avoid an unnecessary goto.
Alexandre Julliard
julliard at winehq.org
Mon Feb 7 15:56:03 CST 2022
Module: wine
Branch: master
Commit: 2895f0fd22ce95d1157efc316de661f770a29d07
URL: https://source.winehq.org/git/wine.git/?a=commit;h=2895f0fd22ce95d1157efc316de661f770a29d07
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Fri Feb 4 19:35:36 2022 -0600
ws2_32: Avoid an unnecessary goto.
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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;
}
/***********************************************************************
More information about the wine-cvs
mailing list