diff --git a/ChangeLog b/ChangeLog index b2ec89a53d3eccc6b12fa0c3b477fa0f9a902120..bd5ce8bcd4055a40e747e9ac1f46f84e4a226f54 100644 --- 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 index 28b1087016fffd885ec56a718504c4a259585eac..5601f35d4416e7f456a2e03690a9b92653150086 100644 --- 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. */