evdev: fix a warning. fd should have initialized value.
authorGwanglim Lee <gl77.lee@samsung.com>
Tue, 23 Aug 2016 02:16:18 +0000 (11:16 +0900)
committerjeon <jhyuni.kang@samsung.com>
Tue, 5 Jan 2021 10:37:53 +0000 (19:37 +0900)
Change-Id: I699f8c714210d59aef57bf715ded91739bf1342a

src/evdev.c

index bb49eef0e01ebfdd9208bbc2f4c003cf1bc12d27..11b91c1b4183121039168de5a17af268bed657f8 100644 (file)
@@ -2211,7 +2211,7 @@ evdev_device_create(struct libinput_seat *seat,
        struct libinput *libinput = seat->libinput;
        struct evdev_device *device = NULL;
        int rc;
-       int fd;
+       int fd = -1;
        int unhandled_device = 0;
        const char *devnode;
        const char *sysname = udev_device_get_sysname(udev_device);