[PATCH] xf86-input-mouse: Return proper default for unknown values in pInfo->device_control.
Terry Lambert
tlambert at chromium.org
Fri Jul 15 17:23:23 PDT 2011
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
More information about the xorg-devel
mailing list