Drop unnecessary memset

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.
Thus all values in the input array are always defined (on success), we don't
need to memset it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This commit is contained in:
Peter Hutterer 2014-04-02 11:57:41 +10:00
parent fda0b3bf23
commit 7164e1d412

View file

@ -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) {