xorg-x11-server/0001-ephyr-xcb_connect-returns-an-error-not-NULL.patch
Adam Jackson 0ba3053e97 1.15RC2
2013-11-20 14:44:57 -05:00

30 lines
968 B
Diff

From c8c5105c1d5c093675d7f571f158147f22f7572b Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue, 29 Oct 2013 14:33:56 +1000
Subject: [PATCH 1/9] ephyr: xcb_connect returns an error, not NULL
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
---
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 ee9ae45..3e01a47 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);
}
--
1.8.3.1