[PATCH libevdev 2/6] Drop unnecessary memset

Benjamin Tissoires benjamin.tissoires at gmail.com
Wed Apr 2 16:09:14 PDT 2014


On Tue, Apr 1, 2014 at 10:17 PM, Peter Hutterer
<peter.hutterer at who-t.net> wrote:
> 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.

nitpicking on the commit message... It seems like you are missing the
purpose of this fact: it just gives me the willing to say "so what?"
:)

(you can change it or not, I will not be that shocked).

Cheers,
Benjamin

>
> 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
>
> _______________________________________________
> Input-tools mailing list
> Input-tools at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/input-tools


More information about the Input-tools mailing list