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).
This commit is contained in:
David Herrmann
2014-09-11 17:20:11 +02:00
parent 48d4c7468f
commit 21978bc3c9
+3 -1
View File
@@ -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)