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

Julien Cristau jcristau at debian.org
Mon Jan 23 23:14:27 UTC 2017


On Mon, Jan 23, 2017 at 14:32:33 -0500, Adam Jackson wrote:

> 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);

I guess the message should be fixed too?

Cheers,
Julien


More information about the xorg-devel mailing list