[PATCH] Coverity Prevent: NO_EFFECT in EvdevWheelEmuSetProperty:

Peter Hutterer peter.hutterer at who-t.net
Fri Jul 17 21:18:21 PDT 2009


On Thu, Jul 16, 2009 at 06:25:37PM +0300, oliver.mcfadden at nokia.com wrote:
> From: Oliver McFadden <oliver.mcfadden at nokia.com>
> 
> Event unsigned_compare: Comparing unsigned less than zero is never true. "pEvdev->emulateWheel.timeout < 0UL"
> 342  	            if (pEvdev->emulateWheel.timeout < 0)
> ---
>  src/emuWheel.c |    9 ---------
>  1 files changed, 0 insertions(+), 9 deletions(-)
> 
> diff --git a/src/emuWheel.c b/src/emuWheel.c
> index bb3a980..a1c754d 100644
> --- a/src/emuWheel.c
> +++ b/src/emuWheel.c
> @@ -337,15 +337,6 @@ EvdevWheelEmuSetProperty(DeviceIntPtr dev, Atom atom, XIPropertyValuePtr val,
>                              16, PropModeReplace, 1,
>                              &pEvdev->emulateWheel.inertia, TRUE);
>              }
> -
> -            /* Don't enable with negative timeout */
> -            if (pEvdev->emulateWheel.timeout < 0)
> -            {
> -                pEvdev->emulateWheel.timeout = 200;
> -                XIChangeDeviceProperty(dev, prop_wheel_timeout, XA_INTEGER, 16,
> -                        PropModeReplace, 1,
> -                        &pEvdev->emulateWheel.timeout, TRUE);
> -            }
>          }
>      }
>      else if (atom == prop_wheel_button)
> -- 
> 1.6.1

merged, thanks. Will push this asap.

Cheers,
  Peter


More information about the xorg-devel mailing list