summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2010-08-25 14:55:48 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-05-20 14:28:56 +1000
commit99accb6cd5d456e278ffeb987a6a6005301e1bb1 (patch)
tree46efc0cccf0ff8109cbfe146d52e458965e29a7b
parent1cd8c5c8c905c6d76bbb89a29100883be252375f (diff)
downloadxf86-input-wacom-99accb6cd5d456e278ffeb987a6a6005301e1bb1.tar.gz
Remove superfluous checks for TVResolution property values.
A CARD32 is unsigned and cannot be less than 0. Remove the checks and move the one leftover check down to the switch statement.
-rw-r--r--src/wcmXCommand.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/wcmXCommand.c b/src/wcmXCommand.c
index 4c81b9c..4716840 100644
--- a/src/wcmXCommand.c
+++ b/src/wcmXCommand.c
@@ -549,13 +549,10 @@ int wcmSetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
values = (CARD32*)prop->data;
/* non-TwinView settings can not set TwinView RESOLUTION */
- if ((priv->twinview == TV_NONE) || (values[0] < 0) ||
- (values[1] < 0) || (values[2] < 0) || (values[3] < 0))
- return BadValue;
-
switch(priv->twinview)
{
- case TV_NONE: break;
+ case TV_NONE:
+ return BadValue;
case TV_ABOVE_BELOW:
case TV_BELOW_ABOVE:
if ((values[1] + values[3]) != screenInfo.screens[0]->height)