From 7fed628d586117dd987947eb7eb22a430290f88c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C5=99emysl=20Janouch?=
Date: Fri, 17 Apr 2015 21:44:44 +0200
Subject: [PATCH] degesch: inline a condition
---
degesch.c | 6 +-----
1 file changed, 1 insertion(+), 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;
}