interactive-evdev: fix missing initialization Accidentally got lost in 6b65be4. Signed-off-by: Ran Benita <ran@unusedvar.com>
diff --git a/tools/interactive-evdev.c b/tools/interactive-evdev.c
index 6b7c8a1..8b0bce0 100644
--- a/tools/interactive-evdev.c
+++ b/tools/interactive-evdev.c
@@ -313,10 +313,10 @@ read_keyboard(struct keyboard *kbd)
static int
loop(struct keyboard *kbds)
{
+ int ret = -1;
struct keyboard *kbd;
nfds_t nfds, i;
struct pollfd *fds = NULL;
- int ret;
for (kbd = kbds, nfds = 0; kbd; kbd = kbd->next, nfds++) {}
fds = calloc(nfds, sizeof(*fds));