diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2013-11-01 14:48:05 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2013-11-04 14:45:35 +1000 |
commit | e6aea4a61a5e5d464bf5419abfbc26c909d87dc9 (patch) | |
tree | 47480a52cf1c44f4ed929e1d2b5002d6bc810652 | |
parent | 2bd942fa6dcaf02c1b825878c3d89badd9319a7f (diff) |
Check return value of EVIOCGPROP ioctl
Doesn't change anything functionally since prop is 0 anyway but this static
analyzers shut up.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Ping Cheng <pingc@wacom.com>
-rw-r--r-- | src/wcmValidateDevice.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wcmValidateDevice.c b/src/wcmValidateDevice.c index 9c0294b..cc0b807 100644 --- a/src/wcmValidateDevice.c +++ b/src/wcmValidateDevice.c @@ -310,10 +310,11 @@ int wcmDeviceTypeKeys(InputInfoPtr pInfo) #ifdef INPUT_PROP_DIRECT { + int rc; unsigned long prop[NBITS(INPUT_PROP_MAX)] = {0}; - ioctl(pInfo->fd, EVIOCGPROP(sizeof(prop)), prop); - if (ISBITSET(prop, INPUT_PROP_DIRECT)) + rc = ioctl(pInfo->fd, EVIOCGPROP(sizeof(prop)), prop); + if (rc >= 0 && ISBITSET(prop, INPUT_PROP_DIRECT)) TabletSetFeature(priv->common, WCM_LCD); } #endif |