summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Expósito <jose.exposito89@gmail.com>2021-11-17 07:57:28 +0100
committerJosé Expósito <jose.exposito89@gmail.com>2021-11-17 07:57:28 +0100
commitb3e65904dbb81181b207711dd7e40c5f85852cfd (patch)
tree107f8d5e3dfcd5d42f504a909bdbf3c9013a5330
parent75cc87518b1ae611e7495be3a516a1395cef5891 (diff)
Make XIPropertyValuePtr verification consistent
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
-rw-r--r--src/xf86libinput.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/xf86libinput.c b/src/xf86libinput.c
index 743a104..0d92b57 100644
--- a/src/xf86libinput.c
+++ b/src/xf86libinput.c
@@ -4435,7 +4435,7 @@ LibinputSetPropertyScrollButtonLock(DeviceIntPtr dev,
struct xf86libinput *driver_data = pInfo->private;
BOOL enabled;
- if (val->format != 8 || val->type != XA_INTEGER || val->size != 1)
+ if (val->format != 8 || val->size != 1 || val->type != XA_INTEGER)
return BadMatch;
enabled = *(BOOL*)val->data;
@@ -4644,7 +4644,7 @@ LibinputSetPropertyHorizScroll(DeviceIntPtr dev,
struct xf86libinput *driver_data = pInfo->private;
BOOL enabled;
- if (val->format != 8 || val->type != XA_INTEGER || val->size != 1)
+ if (val->format != 8 || val->size != 1 || val->type != XA_INTEGER)
return BadMatch;
enabled = *(BOOL*)val->data;
@@ -4671,7 +4671,7 @@ LibinputSetPropertyScrollPixelDistance(DeviceIntPtr dev,
struct xf86libinput *driver_data = pInfo->private;
uint32_t dist;
- if (val->format != 32 || val->type != XA_CARDINAL || val->size != 1)
+ if (val->format != 32 || val->size != 1 || val->type != XA_CARDINAL)
return BadMatch;
dist = *(BOOL*)val->data;