nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 3dee81bfaab1208eb06bdc1c66c9ddff4be1cc04
parent 01888abb223e8ad044c4dfe4ffc8b543c1d31394
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Sat, 19 Mar 2016 17:13:33 +0000

Deleting a now unneeded variable.

We will need this again when one day we make a toggle between
jumping to a directory and searching for a filename fragment,
just like the ^T toggle that exists in the Search / Go-to-line
menus.  But for now, we don't need this.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5745 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

Diffstat:
MChangeLog | 1+
Msrc/browser.c | 7+------
2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -4,6 +4,7 @@ * src/search.c (search_init, do_replace): Don't bother setting the 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. 2016-03-17 Benno Schulenberg <bensberg@justemail.net> * src/search.c (do_research): Use the Search key bindings also during diff --git a/src/browser.c b/src/browser.c @@ -54,8 +54,6 @@ char *do_browser(char *path, DIR *dir) bool old_const_update = ISSET(CONST_UPDATE); char *prev_dir = NULL; /* The directory we were in before backing up to "..". */ - char *ans = NULL; - /* The last answer the user typed at the statusbar prompt. */ size_t old_selected; /* The selected file we had before the current selected file. */ functionptrtype func; @@ -69,8 +67,6 @@ char *do_browser(char *path, DIR *dir) UNSET(CONST_UPDATE); - ans = mallocstrcpy(NULL, ""); - change_browser_directory: /* We go here after we select a new directory. */ @@ -214,7 +210,7 @@ char *do_browser(char *path, DIR *dir) #ifndef DISABLE_TABCOMP FALSE, #endif - MGOTODIR, ans, + MGOTODIR, NULL, #ifndef DISABLE_HISTORIES NULL, #endif @@ -343,7 +339,6 @@ char *do_browser(char *path, DIR *dir) SET(CONST_UPDATE); free(path); - free(ans); free_chararray(filelist, filelist_len); filelist = NULL;