X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fxcb_util.c;h=64a1f6d63b3a8e00f33202ac5bd05cb7ad761661;hb=4aa7a2c849a9536febb2dc7773e06c12a69c5213;hp=fcb11f0429e6673c0148c52abe504314b34e50b2;hpb=163c47bdc0d32785d831e4c93fea9ab7e023446b;p=free-sw%2Fxcb%2Flibxcb diff --git a/src/xcb_util.c b/src/xcb_util.c index fcb11f0..64a1f6d 100644 --- a/src/xcb_util.c +++ b/src/xcb_util.c @@ -34,11 +34,11 @@ #include #include #include -#include #ifdef _WIN32 #include "xcb_windefs.h" #else +#include #include #include #include @@ -424,13 +424,13 @@ xcb_connection_t *xcb_connect_to_display_with_auth_info(const char *displayname, int parsed = _xcb_parse_display(displayname, &host, &protocol, &display, screenp); if(!parsed) { - c = (xcb_connection_t *) &error_connection; + c = _xcb_conn_ret_error(XCB_CONN_CLOSED_PARSE_ERR); goto out; } else fd = _xcb_open(host, protocol, display); if(fd == -1) { - c = (xcb_connection_t *) &error_connection; + c = _xcb_conn_ret_error(XCB_CONN_ERROR); goto out; }