diff options
author | Terry Lambert <tlambert@chromium.org> | 2011-07-15 17:23:22 -0700 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-07-18 11:51:40 +1000 |
commit | 204dcb86368b011824fc5006f87b9e394d03a394 (patch) | |
tree | 23bbc8cee3d32933589c37a27622e02ec8d26748 | |
parent | bd6c54fe672a913334bfba1ca5dc0f2e0f1f1152 (diff) |
Return proper default for unknown values in pInfo->device_control.
Signed-off-by: Terry Lambert <tlambert@chromium.org>
Reviewed-by: Stephane Marchesin <marcheu@chromium.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/jstk.c | 3 | ||||
-rw-r--r-- | src/jstk_key.c | 2 |
2 files changed, 3 insertions, 2 deletions
@@ -419,8 +419,7 @@ jstkDeviceControlProc(DeviceIntPtr pJstk, default: ErrorF("unsupported mode=%d\n", what); - return !Success; - break; + return BadValue; } /* switch (what) */ return Success; } diff --git a/src/jstk_key.c b/src/jstk_key.c index 3c471ce..d699dcd 100644 --- a/src/jstk_key.c +++ b/src/jstk_key.c @@ -169,6 +169,8 @@ jstkKeyboardDeviceControlProc(DeviceIntPtr dev, DBG(2, ErrorF("jstkKeyboardDeviceControlProc what=DEVICE_CLOSE\n")); dev->public.on = FALSE; break; + default: + return BadValue; } return Success; |