Eliding an unneeded variable.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5578 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2016-01-21 18:29:39 +00:00
parent 7a1709f03b
commit a443760d80
2 changed files with 3 additions and 4 deletions

View File

@ -5,6 +5,7 @@
* src/prompt.c (do_prompt_abort): Remove this unneeded function, as * src/prompt.c (do_prompt_abort): Remove this unneeded function, as
nothing can break out of do_prompt(), not a SIGWINCH either. nothing can break out of do_prompt(), not a SIGWINCH either.
* src/prompt.c (get_prompt_string): Delete code that is dead now. * src/prompt.c (get_prompt_string): Delete code that is dead now.
* src/prompt.c (get_prompt_string): Elide an unneeded variable.
2016-01-20 Benno Schulenberg <bensberg@justemail.net> 2016-01-20 Benno Schulenberg <bensberg@justemail.net>
* src/files.c (open_buffer): Readjust the indentation and a comment. * src/files.c (open_buffer): Readjust the indentation and a comment.

View File

@ -734,7 +734,6 @@ functionptrtype get_prompt_string(int *actual, bool allow_tabs,
{ {
int kbinput = ERR; int kbinput = ERR;
bool ran_func, finished; bool ran_func, finished;
size_t curranswer_len;
functionptrtype func; functionptrtype func;
#ifndef DISABLE_TABCOMP #ifndef DISABLE_TABCOMP
bool tabbed = FALSE; bool tabbed = FALSE;
@ -756,10 +755,9 @@ functionptrtype get_prompt_string(int *actual, bool allow_tabs,
#endif /* !DISABLE_HISTORIES */ #endif /* !DISABLE_HISTORIES */
answer = mallocstrcpy(answer, curranswer); answer = mallocstrcpy(answer, curranswer);
curranswer_len = strlen(answer);
if (statusbar_x == (size_t)-1 || statusbar_x > curranswer_len) { if (statusbar_x > strlen(answer)) {
statusbar_x = curranswer_len; statusbar_x = strlen(answer);
statusbar_pww = statusbar_xplustabs(); statusbar_pww = statusbar_xplustabs();
} }