[Xcb] [PATCH libxcb 1/2] xcb_open: Minor code cleanup for better readability
Jeremy Huddleston Sequoia
jeremyhu at apple.com
Sat Apr 5 21:29:35 PDT 2014
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
---
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 466dc23..0c5b07f 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);
--
1.9.1
More information about the Xcb
mailing list