[PATCH xserver 19/19] loader: Fix an obviously backwards comparison

Adam Jackson ajax at redhat.com
Mon Jan 23 19:32:33 UTC 2017


Hmm, this code looks wrong to me. I know! Instead of fix it, I'll put a
comment here that nobody will look at for decades on end.

Yaaaaaaay xfree86.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 hw/xfree86/loader/loadmod.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index ca77c7a..55bec14 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -545,8 +545,7 @@ CheckVersion(const char *module, XF86ModuleVersionInfo * data,
                                "(%d)\n", module, maj, reqmaj);
                 return FALSE;
             }
-            /* XXX Maybe this should be the other way around? */
-            if (min > reqmin) {
+            if (min < reqmin) {
                 LogMessageVerb(X_WARNING, 2, "%s: module ABI minor version "
                                "(%d) is newer than that available (%d)\n",
                                module, min, reqmin);
-- 
2.9.3



More information about the xorg-devel mailing list