From 730b46c1390c28a863df5f017c4e024c7579d725 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Mon, 21 Mar 2016 20:38:08 +0000 Subject: [PATCH] Trimming a duplicate variable. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5757 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 3 +++ src/browser.c | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index b2ec89a5..bd5ce8bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2016-03-21 Benno Schulenberg + * src/browser.c (findnextfile): Trim a duplicate variable. + 2016-03-20 Benno Schulenberg * 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 28b10870..5601f35d 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. */ -- 2.39.5