summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérémie Courrèges-Anglas <jca@wxcvbn.org>2014-09-15 09:12:08 +0200
committerJérémie Courrèges-Anglas <jca@wxcvbn.org>2014-09-15 09:12:08 +0200
commit28d044cc6e7513135b860d09076c04c1a01a3493 (patch)
tree6346ff25e77a86dc486fb648eff847a7c7f6c1c8
parentc034f7535bd01b183ce7dd1ae4d645af7d2c8bc9 (diff)
downloadratpoison-28d044cc6e7513135b860d09076c04c1a01a3493.zip
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.
-rw-r--r--src/xinerama.c2
1 files changed, 1 insertions, 1 deletions
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;
}