mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2026-01-05 04:20:14 +01:00
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:
parent
fda0b3bf23
commit
7164e1d412
1 changed files with 0 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue