chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
48d4c74
)
terminal: fix uninitialized variable in strerror() log message
author
David Herrmann
<dh.herrmann@gmail.com>
Thu, 11 Sep 2014 15:20:11 +0000
(17:20 +0200)
committer
David Herrmann
<dh.herrmann@gmail.com>
Thu, 11 Sep 2014 15:20:11 +0000
(17:20 +0200)
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).
src/libsystemd-terminal/idev-keyboard.c
patch
|
blob
|
history
diff --git
a/src/libsystemd-terminal/idev-keyboard.c
b/src/libsystemd-terminal/idev-keyboard.c
index ab9e4811b3bb88837836968f12443c09732d034f..d5936b7d236ab983b040a3b43ef0fb40ea1ac668 100644
(file)
--- 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)