Instead of initializing the whole uds array, memset would only set the first
4 bytes

Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
---
 input.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/input.c b/input.c
index 2844b6a..e68e583 100644
--- a/input.c
+++ b/input.c
@@ -146,7 +146,7 @@ int input_poll(struct session *session)
        int retval, i, j;
        short events;
 
-       memset(devices->ufds, 0, sizeof(devices->ufds));
+       memset(devices->ufds, 0, devices->size * sizeof(*devices->ufds));
        for (i = 0, j = 1; i < devices->count; i++) {
                dev = &devices->device[i];
 
-- 
1.7.11.2


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to