summaryrefslogtreecommitdiff
path: root/xcbdpyinfo.c
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2006-11-20 15:59:39 -0800
committerJamey Sharp <jamey@minilop.net>2006-11-20 15:59:39 -0800
commitb649faee831f4291fee41b2d90acb319f6bc8cba (patch)
tree06d954254185c7d2d85b10f5a718e5156f59d7cc /xcbdpyinfo.c
parente6b69e8c29469dff4ef0ad4a2bccab63efa6af4f (diff)
Update connection-failed handling to check for error objects instead of null.
In essence, replace 'if(!c)' with 'if(xcb_connection_has_error(c))'.
Diffstat (limited to 'xcbdpyinfo.c')
-rw-r--r--xcbdpyinfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xcbdpyinfo.c b/xcbdpyinfo.c
index ae4b574..beaa144 100644
--- a/xcbdpyinfo.c
+++ b/xcbdpyinfo.c
@@ -19,7 +19,7 @@ int main(int argc, char **argv)
int screen;
c = xcb_connect(0, &screen);
- if(!c)
+ if(xcb_connection_has_error(c))
{
fputs("Connect failed.\n", stderr);
exit(1);