From 7b935e0d40df568d385c3e53076aefe17c14a30c Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 11 Sep 2022 11:57:11 +0200 Subject: [PATCH] tweaks: elide an intermediary variable that is no longer needed --- src/browser.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/browser.c b/src/browser.c index fb8f838c..96d43cc5 100644 --- a/src/browser.c +++ b/src/browser.c @@ -261,8 +261,6 @@ void findfile(const char *needle, bool forwards) { size_t looking_at = selected; /* The location in the file list of the filename we're looking at. */ - const char *thename; - /* The plain filename, without the path. */ /* Step through each filename in the list until a match is found or * we've come back to the point where we started. */ @@ -279,12 +277,9 @@ void findfile(const char *needle, bool forwards) } } - /* Get the bare filename, without the path. */ - thename = tail(filelist[looking_at]); - /* If the needle matches, we're done. And if we're back at the file * where we started, it is the only occurrence. */ - if (mbstrcasestr(thename, needle)) { + if (mbstrcasestr(tail(filelist[looking_at]), needle)) { if (looking_at == selected) statusbar(_("This is the only occurrence")); break;