Doesn't change anything functionally since prop is 0 anyway but this static
analyzers shut up.

Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
---
 src/wcmValidateDevice.c | 5 +++--
 1 file 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
-- 
1.8.3.1


------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to