A CARD32 is unsigned and cannot be less than 0. Remove the checks and move
the one leftover check down to the switch statement.
---
 src/wcmXCommand.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/wcmXCommand.c b/src/wcmXCommand.c
index 9e1b5fa..40afe60 100644
--- a/src/wcmXCommand.c
+++ b/src/wcmXCommand.c
@@ -842,13 +842,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)
-- 
1.7.2.2


------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to