From 28d044cc6e7513135b860d09076c04c1a01a3493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Courr=C3=A8ges-Anglas?= Date: Mon, 15 Sep 2014 09:12:08 +0200 Subject: Correct tortuous comparison that triggers warnings The code was actually correct but boy, this is no way to write a comparison. XineramaQueryVersion() returns zero on failure, so compare against that. Not False, not Success, not Maybe. --- src/xinerama.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xinerama.c b/src/xinerama.c index 51d51b3..cfa6efb 100644 --- a/src/xinerama.c +++ b/src/xinerama.c @@ -47,7 +47,7 @@ init_xinerama(void) return; } - if (!XineramaQueryVersion(dpy, &major, &minor) != Success) { + if (XineramaQueryVersion(dpy, &major, &minor) == 0) { return; } -- cgit v1.2.3