From fc1edf28cede35bdcb697769399b9f7795293fd8 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sat, 19 Mar 2016 17:19:30 +0000 Subject: [PATCH] Deleting another unneeded variable. Fully redundant. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5746 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 1 + src/search.c | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7a0ed272..8e1604a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ current answer to the empty string, as do_prompt() can handle a NULL. * src/browser.c (do_browser): Delete a snippet of dead code. * src/browser.c (do_browser): Delete an unneeded variable. + * src/search.c (do_gotolinecolumn): Delete another unneeded variable. 2016-03-17 Benno Schulenberg * src/search.c (do_research): Use the Search key bindings also during diff --git a/src/search.c b/src/search.c index 33faf9e0..0ef9f3e2 100644 --- a/src/search.c +++ b/src/search.c @@ -918,7 +918,6 @@ void do_gotolinecolumn(ssize_t line, ssize_t column, bool use_answer, bool interactive) { if (interactive) { - char *ans = mallocstrcpy(NULL, answer); functionptrtype func; /* Ask for the line and column. */ @@ -926,15 +925,13 @@ void do_gotolinecolumn(ssize_t line, ssize_t column, bool use_answer, #ifndef DISABLE_TABCOMP TRUE, #endif - MGOTOLINE, use_answer ? ans : "", + MGOTOLINE, use_answer ? answer : NULL, #ifndef DISABLE_HISTORIES NULL, #endif /* TRANSLATORS: This is a prompt. */ edit_refresh, _("Enter line number, column number")); - free(ans); - /* Cancel, or Enter with blank string. */ if (i < 0) { statusbar(_("Cancelled")); -- 2.39.5