From 29e419c5840a1eeda3336a0802686ee723dcaab3 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Sequoia Date: Sat, 5 Apr 2014 21:09:42 -0700 Subject: xcb_open: Minor code cleanup for better readability Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Uli Schlachter --- src/xcb_util.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/xcb_util.c b/src/xcb_util.c index 1625742..f8d381d 100644 --- a/src/xcb_util.c +++ b/src/xcb_util.c @@ -438,16 +438,17 @@ xcb_connection_t *xcb_connect_to_display_with_auth_info(const char *displayname, if(!parsed) { c = _xcb_conn_ret_error(XCB_CONN_CLOSED_PARSE_ERR); goto out; - } else { + } + #ifdef _WIN32 - WSADATA wsaData; - if (WSAStartup(MAKEWORD(2, 2), &wsaData) != 0) { - c = _xcb_conn_ret_error(XCB_CONN_ERROR); - goto out; - } -#endif - fd = _xcb_open(host, protocol, display); + WSADATA wsaData; + if (WSAStartup(MAKEWORD(2, 2), &wsaData) != 0) { + c = _xcb_conn_ret_error(XCB_CONN_ERROR); + goto out; } +#endif + + fd = _xcb_open(host, protocol, display); if(fd == -1) { c = _xcb_conn_ret_error(XCB_CONN_ERROR); -- cgit v1.2.3