[PATCH] xf86-input-mouse: Return proper default for unknown values in pInfo->device_control.
Peter Hutterer
peter.hutterer at who-t.net
Sun Jul 17 18:36:12 PDT 2011
On Fri, Jul 15, 2011 at 05:23:23PM -0700, Terry Lambert wrote:
> Signed-off-by: Terry Lambert <tlambert at chromium.org>
> Reviewed-by: Stephane Marchesin <marcheu at chromium.org>
> ---
> src/bsd_mouse.c | 3 +++
> src/mouse.c | 3 +++
> 2 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/src/bsd_mouse.c b/src/bsd_mouse.c
> index 14b529d..e9f61f8 100644
> --- a/src/bsd_mouse.c
> +++ b/src/bsd_mouse.c
> @@ -555,6 +555,9 @@ usbMouseProc(DeviceIntPtr pPointer, int what)
> pPointer->public.on = FALSE;
> usleep(300000);
> break;
> +
> + default:
> + return BadValue;
> }
> return Success;
> }
> diff --git a/src/mouse.c b/src/mouse.c
> index d981f6f..238d7f7 100644
> --- a/src/mouse.c
> +++ b/src/mouse.c
> @@ -1691,6 +1691,9 @@ MouseProc(DeviceIntPtr device, int what)
> free(pMse->mousePriv);
> pMse->mousePriv = NULL;
> break;
> +
> + default:
> + return BadValue;
> }
> return Success;
> }
> --
> 1.7.3.1
pushed, thanks
Cheers,
Peter
More information about the xorg-devel
mailing list