aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-04-17 21:44:44 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-04-17 21:44:44 +0200
commit7fed628d586117dd987947eb7eb22a430290f88c (patch)
treeb0b72d0ccba032a8fa9479b3360730302d20780e
parent61ebbe245b29fc20b163d80072c1b6f0b5be0d84 (diff)
downloadxK-7fed628d586117dd987947eb7eb22a430290f88c.tar.gz
xK-7fed628d586117dd987947eb7eb22a430290f88c.tar.xz
xK-7fed628d586117dd987947eb7eb22a430290f88c.zip
degesch: inline a condition
-rw-r--r--degesch.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/degesch.c b/degesch.c
index 73ce587..998f58a 100644
--- a/degesch.c
+++ b/degesch.c
@@ -1396,12 +1396,8 @@ on_readline_goto_buffer (int count, int key)
if (n < 0 || n > 9)
return 0;
- // There's no zero-th buffer
- if (n == 0)
- n = 10;
-
struct app_context *ctx = g_ctx;
- if (!buffer_goto (ctx, n))
+ if (!buffer_goto (ctx, n == 0 ? 10 : n))
rl_ding ();
return 0;
}