diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2010-08-25 14:55:48 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-05-20 14:28:56 +1000 |
commit | 99accb6cd5d456e278ffeb987a6a6005301e1bb1 (patch) | |
tree | 46efc0cccf0ff8109cbfe146d52e458965e29a7b | |
parent | 1cd8c5c8c905c6d76bbb89a29100883be252375f (diff) | |
download | xf86-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.c | 7 |
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) |