diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2014-11-28 18:23:20 +0100 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2014-11-28 18:24:30 +0100 |
commit | 23bbb0de4e3f85d9704a5c12a5afa2dfa0159e41 (patch) | |
tree | 28e66fb86dd0cffc3a3cca3cf234cb52c3b64ad3 /src/libsystemd-terminal/idev-keyboard.c | |
parent | 5e03c6e3b517286bbd65b48d88f60e5b83721894 (diff) |
treewide: more log_*_errno + return simplifications
Diffstat (limited to 'src/libsystemd-terminal/idev-keyboard.c')
-rw-r--r-- | src/libsystemd-terminal/idev-keyboard.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/libsystemd-terminal/idev-keyboard.c b/src/libsystemd-terminal/idev-keyboard.c index bcb2a4b1e2..def8ea5ebe 100644 --- a/src/libsystemd-terminal/idev-keyboard.c +++ b/src/libsystemd-terminal/idev-keyboard.c @@ -445,8 +445,7 @@ static int kbdctx_query_locale(kbdctx *kc) { return 0; error: - log_debug_errno(r, "idev-keyboard: cannot send GetAll to locale1: %m"); - return r; + return log_debug_errno(r, "idev-keyboard: cannot send GetAll to locale1: %m"); } static int kbdctx_locale_props_changed_fn(sd_bus *bus, @@ -477,8 +476,7 @@ static int kbdctx_locale_props_changed_fn(sd_bus *bus, return 0; error: - log_debug_errno(r, "idev-keyboard: cannot handle PropertiesChanged from locale1: %m"); - return r; + return log_debug_errno(r, "idev-keyboard: cannot handle PropertiesChanged from locale1: %m"); } static int kbdctx_setup_bus(kbdctx *kc) { @@ -493,10 +491,8 @@ static int kbdctx_setup_bus(kbdctx *kc) { "path='/org/freedesktop/locale1'", kbdctx_locale_props_changed_fn, kc); - if (r < 0) { - log_debug_errno(r, "idev-keyboard: cannot setup locale1 link: %m"); - return r; - } + if (r < 0) + return log_debug_errno(r, "idev-keyboard: cannot setup locale1 link: %m"); return kbdctx_query_locale(kc); } @@ -1125,9 +1121,8 @@ static int keyboard_update_kbdmap(idev_keyboard *k) { return 0; error: - log_debug_errno(r, "idev-keyboard: %s/%s: cannot adopt new keymap: %m", - d->session->name, d->name); - return r; + return log_debug_errno(r, "idev-keyboard: %s/%s: cannot adopt new keymap: %m", + d->session->name, d->name); } static int keyboard_update_kbdtbl(idev_keyboard *k) { |