From: Benno Schulenberg Date: Sat, 19 Mar 2016 17:13:33 +0000 (+0000) Subject: Deleting a now unneeded variable. X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=3dee81bfaab1208eb06bdc1c66c9ddff4be1cc04;p=nano.git 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 --- diff --git a/ChangeLog b/ChangeLog index 5f487a13..7a0ed272 100644 --- 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 * src/search.c (do_research): Use the Search key bindings also during diff --git a/src/browser.c b/src/browser.c index 2d30bbdd..28b10870 100644 --- 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;