From 7d15d1d8d8af4519e9173c5af078c79d4abef818 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Wed, 30 Aug 2006 13:52:33 +0000 Subject: [PATCH] in get_input(), simplify to avoid an unnecessary key_buffer_len check git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3869 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 3 +++ src/winio.c | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 75128b56..fd557c71 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,9 @@ CVS code - properly reset when we get out of all statusbar prompts. Changes to do_insertfile(), do_writeout(), handle_sigwinch(), main(), and do_prompt_abort(). (DLR) +- winio.c: + get_input() + - Simplify to avoid an unnecessary key_buffer_len check. (DLR) GNU nano 1.9.99pre1 - 2006.08.29 - General: diff --git a/src/winio.c b/src/winio.c index bec32fe6..3b08b702 100644 --- a/src/winio.c +++ b/src/winio.c @@ -254,10 +254,12 @@ int *get_input(WINDOW *win, size_t input_len) #endif if (key_buffer_len == 0) { - if (win != NULL) + if (win != NULL) { get_key_buffer(win); - if (key_buffer_len == 0) + if (key_buffer_len == 0) + return NULL; + } else return NULL; } -- 2.39.5