Commit c14910a0de22605b3afce5ea1470fe47908f2b5e

Ran Benita 2021-03-28T16:10:52

interactive-evdev: fix missing initialization Accidentally got lost in 6b65be4. Signed-off-by: Ran Benita <ran@unusedvar.com>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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));