|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From 21978bc3c90ec192130a9ea9df62a75d1262b80c Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From: David Herrmann <dh.herrmann@gmail.com>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Date: Thu, 11 Sep 2014 17:20:11 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Subject: [PATCH] terminal: fix uninitialized variable in strerror() log
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
message
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
We currently print weird error-messages if xkbcommon fails (which cannot
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
fail so far, but might in the future). Fix the uninitialized variable
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
warnings by setting 'r' correctly.
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Thanks to Philippe De Swert for catching this (via coverity).
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
src/libsystemd-terminal/idev-keyboard.c | 4 +++-
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
diff --git a/src/libsystemd-terminal/idev-keyboard.c b/src/libsystemd-terminal/idev-keyboard.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
index ab9e4811b3..d5936b7d23 100644
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
--- a/src/libsystemd-terminal/idev-keyboard.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+++ b/src/libsystemd-terminal/idev-keyboard.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
@@ -770,8 +770,10 @@ static int keyboard_feed_evdev(idev_keyboard *k, idev_data *data) {
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
/* TODO: update LEDs */
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
}
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- if (num < 0)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ if (num < 0) {
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ r = num;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
goto error;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ }
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
r = keyboard_fill(k, &k->evdata, data->resync, ev->code, ev->value, num, keysyms);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
if (r < 0)
|