CARD16 length;
} XCBSetupGeneric;
+static const int error_connection = 1;
+
static int set_fd_flags(const int fd)
{
long flags = fcntl(fd, F_GETFL, 0);
c = calloc(1, sizeof(XCBConnection));
if(!c)
- return 0;
+ return (XCBConnection *) &error_connection;
c->fd = fd;
))
{
XCBDisconnect(c);
- return 0;
+ return (XCBConnection *) &error_connection;
}
return c;
#include "xcbext.h"
#include "xcbint.h"
+static const int error_connection = 1;
+
int XCBPopcount(CARD32 mask)
{
unsigned long y;
XCBAuthInfo auth;
if(!XCBParseDisplay(displayname, &host, &display, screenp))
- return 0;
+ return (XCBConnection *) &error_connection;
fd = _xcb_open(host, display);
free(host);
if(fd == -1)
- return 0;
+ return (XCBConnection *) &error_connection;
_xcb_get_auth_info(fd, &auth);
c = XCBConnectToFD(fd, &auth);
char *host;
if(!XCBParseDisplay(displayname, &host, &display, screenp))
- return 0;
+ return (XCBConnection *) &error_connection;
fd = _xcb_open(host, display);
free(host);
if(fd == -1)
- return 0;
+ return (XCBConnection *) &error_connection;
return XCBConnectToFD(fd, auth);
}