summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-03-07 14:30:56 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-03-07 14:30:56 -0500
commit33f1b0aeea5a2bc9100360f14f7da1a4f61c3c01 (patch)
treef7351d307b1089c95d598a882ca78352ce27e3fc /src
parentdcee01125dde502bd8108c36ddf2026c1348865f (diff)
libsystemd-terminal: use at most LOG_ERR for XKB errors
XKB errors aren't *that* important. Coverity complained that the same action is taken in multiple branches, which is semi-valid, so is fixed too (CID #1256582).
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd-terminal/idev-keyboard.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/libsystemd-terminal/idev-keyboard.c b/src/libsystemd-terminal/idev-keyboard.c
index 1ee13ffd15..f90f1b56d5 100644
--- a/src/libsystemd-terminal/idev-keyboard.c
+++ b/src/libsystemd-terminal/idev-keyboard.c
@@ -506,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);