Blame SOURCES/0001-xfree86-Fix-off-by-one-in-X-configure.patch
|
|
a3e08e |
From e437e3cae10b730d3d8bb64e0b720064f39ca0b6 Mon Sep 17 00:00:00 2001
|
|
|
a3e08e |
From: Adam Jackson <ajax@redhat.com>
|
|
|
a3e08e |
Date: Mon, 26 Jun 2017 17:31:14 -0400
|
|
|
a3e08e |
Subject: [PATCH] xfree86: Fix off-by-one in X -configure
|
|
|
a3e08e |
|
|
|
a3e08e |
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
|
a3e08e |
---
|
|
|
a3e08e |
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
|
|
|
a3e08e |
index df3ca50..3994805 100644
|
|
|
a3e08e |
--- a/hw/xfree86/common/xf86Config.c
|
|
|
a3e08e |
+++ b/hw/xfree86/common/xf86Config.c
|
|
|
a3e08e |
@@ -545,11 +545,11 @@ driver_sort(const void *_l, const void *_r)
|
|
|
a3e08e |
return strcmp(l, r);
|
|
|
a3e08e |
|
|
|
a3e08e |
/* left is a fallback */
|
|
|
a3e08e |
- if (left >= 0)
|
|
|
a3e08e |
+ if (left >= 0 && right < 0)
|
|
|
a3e08e |
return 1;
|
|
|
a3e08e |
|
|
|
a3e08e |
/* right is a fallback */
|
|
|
a3e08e |
- if (right >= 0)
|
|
|
a3e08e |
+ if (right >= 0 && left > 0)
|
|
|
a3e08e |
return -1;
|
|
|
a3e08e |
|
|
|
a3e08e |
/* both are fallbacks, which is worse */
|
|
|
a3e08e |
@@ -563,7 +563,6 @@ fixup_video_driver_list(const char **drivers)
|
|
|
a3e08e |
|
|
|
a3e08e |
/* walk to the end of the list */
|
|
|
a3e08e |
for (end = drivers; *end && **end; end++);
|
|
|
a3e08e |
- end--;
|
|
|
a3e08e |
|
|
|
a3e08e |
qsort(drivers, end - drivers, sizeof(const char *), driver_sort);
|
|
|
a3e08e |
}
|
|
|
a3e08e |
--
|
|
|
a3e08e |
2.13.0
|
|
|
a3e08e |
|