summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2014-09-11 17:20:11 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2014-09-11 17:20:11 +0200
commit21978bc3c90ec192130a9ea9df62a75d1262b80c (patch)
tree3a8f5a93b8e233c40bebe81c40849ca6a08b407b
parent48d4c7468fb5003ae45ac834de1ca85624cdd56e (diff)
terminal: fix uninitialized variable in strerror() log message
We currently print weird error-messages if xkbcommon fails (which cannot fail so far, but might in the future). Fix the uninitialized variable warnings by setting 'r' correctly. Thanks to Philippe De Swert for catching this (via coverity).
-rw-r--r--src/libsystemd-terminal/idev-keyboard.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsystemd-terminal/idev-keyboard.c b/src/libsystemd-terminal/idev-keyboard.c
index ab9e4811b3..d5936b7d23 100644
--- a/src/libsystemd-terminal/idev-keyboard.c
+++ b/src/libsystemd-terminal/idev-keyboard.c
@@ -770,8 +770,10 @@ static int keyboard_feed_evdev(idev_keyboard *k, idev_data *data) {
/* TODO: update LEDs */
}
- if (num < 0)
+ if (num < 0) {
+ r = num;
goto error;
+ }
r = keyboard_fill(k, &k->evdata, data->resync, ev->code, ev->value, num, keysyms);
if (r < 0)