summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston Sequoia <jeremyhu@apple.com>2014-04-05 21:09:42 -0700
committerJeremy Huddleston Sequoia <jeremyhu@apple.com>2014-04-10 09:50:54 -0700
commit29e419c5840a1eeda3336a0802686ee723dcaab3 (patch)
tree4bdbad7d67a811546ab0a61cd80f438600c508a5
parentbe0fe56c3bcad5124dcc6c47a2fad01acd16f71a (diff)
xcb_open: Minor code cleanup for better readability
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Uli Schlachter <psychon@znc.in>
-rw-r--r--src/xcb_util.c17
1 files 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);