summaryrefslogtreecommitdiff
path: root/src/libsystemd-terminal/idev-keyboard.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-11-28 17:34:26 +0100
committerMichal Schmidt <mschmidt@redhat.com>2014-11-28 17:34:26 +0100
commiteb56eb9b40950f1edcffdb7313f8de4f8572a6d5 (patch)
tree6e6c04129d1bb12b5ff3fcfbc26a294766079e0e /src/libsystemd-terminal/idev-keyboard.c
parentc33b329709ebe2755181980a050d02ec7c81ed87 (diff)
treewide: simplify log_*_errno(r,...) immediately followed by "return r"
Diffstat (limited to 'src/libsystemd-terminal/idev-keyboard.c')
-rw-r--r--src/libsystemd-terminal/idev-keyboard.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/libsystemd-terminal/idev-keyboard.c b/src/libsystemd-terminal/idev-keyboard.c
index e971ab360d..bcb2a4b1e2 100644
--- a/src/libsystemd-terminal/idev-keyboard.c
+++ b/src/libsystemd-terminal/idev-keyboard.c
@@ -332,10 +332,8 @@ static int kbdctx_refresh_keymap(kbdctx *kc) {
/* TODO: add a fallback keymap that's compiled-in */
r = kbdmap_new_from_names(&km, kc, kc->last_x11_model, kc->last_x11_layout,
kc->last_x11_variant, kc->last_x11_options);
- if (r < 0) {
- log_debug_errno(r, "idev-keyboard: cannot create keymap from locale1: %m");
- return r;
- }
+ if (r < 0)
+ return log_debug_errno(r, "idev-keyboard: cannot create keymap from locale1: %m");
kbdmap_unref(kc->kbdmap);
kc->kbdmap = km;
@@ -1161,9 +1159,8 @@ static int keyboard_update_kbdtbl(idev_keyboard *k) {
return 0;
error:
- log_debug_errno(r, "idev-keyboard: %s/%s: cannot adopt new compose table: %m",
- d->session->name, d->name);
- return r;
+ return log_debug_errno(r, "idev-keyboard: %s/%s: cannot adopt new compose table: %m",
+ d->session->name, d->name);
}
static const idev_device_vtable keyboard_vtable = {