summaryrefslogtreecommitdiff
path: root/dix/inpututils.c
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2009-06-22 08:59:45 -0400
committerPeter Hutterer <peter.hutterer@who-t.net>2009-06-23 11:53:33 +1000
commit07154db4a8b96467785fd6be93d20379acacffa8 (patch)
tree59132eeb423ac734cb499fb5854fb26f0b9f6c76 /dix/inpututils.c
parent96706c24bd57fbd9b11e5bd5e38d05d81b90aebe (diff)
Xi: Remove redundant and incorrect butmap range check
Maps are CARD8s, therefore checking for values above 255 is completely unnecessary. Moreover, 0 is a valid value for maps, so the check wasn't even correct to begin with. This fixes bug #22392, which was uncovered by commit 280b7f92d729ec910ffa3d18dce7bbc215be7a3c. Signed-off-by: Ben Gamari <bgamari.foss@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'dix/inpututils.c')
-rw-r--r--dix/inpututils.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/dix/inpututils.c b/dix/inpututils.c
index 79b6ab7c7..8194e69b1 100644
--- a/dix/inpututils.c
+++ b/dix/inpututils.c
@@ -54,12 +54,6 @@ check_butmap_change(DeviceIntPtr dev, CARD8 *map, int len, CARD32 *errval_out,
for (i = 0; i < len; i++) {
if (dev->button->map[i + 1] != map[i] && dev->button->down[i + 1])
return MappingBusy;
-
- if (map[i] < 1 || map[i] > 255) {
- if (errval_out)
- *errval_out = map[i];
- return -1;
- }
}
return Success;