commit 730b46c1390c28a863df5f017c4e024c7579d725
parent f150894d4e71ba95e2538456a493c165583d71c6
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Mon, 21 Mar 2016 20:38:08 +0000
Trimming a duplicate variable.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5757 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,6 @@
+2016-03-21 Benno Schulenberg <bensberg@justemail.net>
+ * src/browser.c (findnextfile): Trim a duplicate variable.
+
2016-03-20 Benno Schulenberg <bensberg@justemail.net>
* src/files.c (do_writeout), src/nano.c (do_exit): Normalize the
punctuation in some prompts: no space before a question mark, and
diff --git a/src/browser.c b/src/browser.c
@@ -738,7 +738,6 @@ void findnextfile(const char *needle)
/* Have we reached the starting file again? */
const char *filetail = tail(filelist[looking_at]);
/* The filename we display, minus the path. */
- const char *rev_start = filetail, *found = NULL;
unsigned stash[sizeof(flags) / sizeof(flags[0])];
/* A storage place for the current flag settings. */
@@ -753,7 +752,7 @@ void findnextfile(const char *needle)
/* Step through each filename in the list until a match is found or
* we've come back to the point where we started. */
while (TRUE) {
- found = strstrwrapper(filetail, needle, rev_start);
+ const char *found = strstrwrapper(filetail, needle, filetail);
/* If we've found a match and it's not the same filename where
* we started, then we're done. */
@@ -787,8 +786,6 @@ void findnextfile(const char *needle)
came_full_circle = TRUE;
filetail = tail(filelist[looking_at]);
-
- rev_start = filetail;
}
/* Restore the settings of all flags. */