X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flibsystemd-terminal%2Fidev-keyboard.c;h=def8ea5ebe8427df5e40f73d78da6d0a4c254774;hb=98940a3cd93807b5a3809bb1fb7ab43d450939f1;hp=e971ab360deb924edfe02315970af6024f98315a;hpb=c33b329709ebe2755181980a050d02ec7c81ed87;p=elogind.git diff --git a/src/libsystemd-terminal/idev-keyboard.c b/src/libsystemd-terminal/idev-keyboard.c index e971ab360..def8ea5eb 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; @@ -447,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, @@ -479,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) { @@ -495,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); } @@ -1127,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) { @@ -1161,9 +1154,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 = {