[PATCH libevdev 2/6] Drop unnecessary memset

Peter Hutterer peter.hutterer at who-t.net
Tue Apr 1 19:17:25 PDT 2014


The EVICOCGMTSLOTS ioctl returns all slot values for the requested code or an
error code, it doesn't return the number of bytes successfully transferred.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 libevdev/libevdev.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/libevdev/libevdev.c b/libevdev/libevdev.c
index 2506a9e..99e86a0 100644
--- a/libevdev/libevdev.c
+++ b/libevdev/libevdev.c
@@ -571,7 +571,6 @@ sync_mt_state(struct libevdev *dev, int create_events)
 		if (!libevdev_has_event_code(dev, EV_ABS, axis))
 			continue;
 
-		memset(&mt_state, 0, sizeof(mt_state));
 		mt_state.code = axis;
 		rc = ioctl(dev->fd, EVIOCGMTSLOTS(sizeof(struct mt_state)), &mt_state);
 		if (rc < 0) {
-- 
1.9.0



More information about the Input-tools mailing list