chiark / gitweb /
sd-event: fix typo
[elogind.git] / src / libsystemd-terminal / idev-keyboard.c
index def8ea5ebe8427df5e40f73d78da6d0a4c254774..f90f1b56d553d8bc8f08239c7d1f6def9e523907 100644 (file)
@@ -19,7 +19,6 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <inttypes.h>
 #include <stdbool.h>
 #include <stdlib.h>
 #include <systemd/sd-bus.h>
@@ -507,12 +506,9 @@ static void kbdctx_log_fn(struct xkb_context *ctx, enum xkb_log_level lvl, const
                 sd_lvl = LOG_INFO;
         else if (lvl >= XKB_LOG_LEVEL_WARNING)
                 sd_lvl = LOG_INFO; /* most XKB warnings really are informational */
-        else if (lvl >= XKB_LOG_LEVEL_ERROR)
-                sd_lvl = LOG_ERR;
-        else if (lvl >= XKB_LOG_LEVEL_CRITICAL)
-                sd_lvl = LOG_CRIT;
         else
-                sd_lvl = LOG_CRIT;
+                /* XKB_LOG_LEVEL_ERROR and worse */
+                sd_lvl = LOG_ERR;
 
         snprintf(buf, sizeof(buf), "idev-xkb: %s", format);
         log_internalv(sd_lvl, 0, __FILE__, __LINE__, __func__, buf, args);
@@ -631,7 +627,7 @@ idev_device *idev_find_keyboard(idev_session *s, const char *name) {
         assert_return(s, NULL);
         assert_return(name, NULL);
 
-        kname = strappenda("keyboard/", name);
+        kname = strjoina("keyboard/", name);
         return hashmap_get(s->device_map, kname);
 }
 
@@ -793,7 +789,7 @@ int idev_keyboard_new(idev_device **out, idev_session *s, const char *name) {
         if (r < 0)
                 return r;
 
-        kname = strappenda("keyboard/", name);
+        kname = strjoina("keyboard/", name);
         r = idev_device_add(d, kname);
         if (r < 0)
                 return r;