From c8c5105c1d5c093675d7f571f158147f22f7572b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 29 Oct 2013 14:33:56 +1000 Subject: [PATCH] ephyr: xcb_connect returns an error, not NULL Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard --- hw/kdrive/ephyr/hostx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c index ee9ae455c..3e01a4770 100644 --- a/hw/kdrive/ephyr/hostx.c +++ b/hw/kdrive/ephyr/hostx.c @@ -304,8 +304,8 @@ hostx_init(void) | XCB_EVENT_MASK_STRUCTURE_NOTIFY; EPHYR_DBG("mark"); - - if ((HostX.conn = xcb_connect(NULL, &HostX.screen)) == NULL) { + HostX.conn = xcb_connect(NULL, &HostX.screen); + if (xcb_connection_has_error(HostX.conn)) { fprintf(stderr, "\nXephyr cannot open host display. Is DISPLAY set?\n"); exit(1); }