nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 6fb15098179ecd3638b2ed7c31339c8018b62cd0
parent 07ddf25cc0f17a4652ba601b0eb50068ad6cc905
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Thu, 24 May 2018 18:17:58 +0200

tweaks: condense two statements into one, and elide a 'break'

Diffstat:
Msrc/text.c | 11++++-------
1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/text.c b/src/text.c @@ -3265,15 +3265,12 @@ void do_linter(void) if (stat(curlint->filename, &lintfileinfo) != -1 && openfile->current_stat->st_ino != lintfileinfo.st_ino) { - openfilestruct *tmpof = openfile; - #ifdef ENABLE_MULTIBUFFER - tmpof = tmpof->next; - while (tmpof != openfile) { - if (tmpof->current_stat->st_ino == lintfileinfo.st_ino) - break; + openfilestruct *tmpof = openfile->next; + + while (tmpof != openfile && + tmpof->current_stat->st_ino != lintfileinfo.st_ino) tmpof = tmpof->next; - } if (tmpof->current_stat->st_ino != lintfileinfo.st_ino) { char *msg = charalloc(1024 + strlen(curlint->filename));