tweaks: use a more meaningful variable name, and avoid a distant 'else'

Also, indent a continuation line better.
master
Benno Schulenberg 2018-05-24 18:28:59 +02:00
parent 6fb1509817
commit 3e9ef3032f
1 changed files with 8 additions and 8 deletions

View File

@ -3264,15 +3264,16 @@ void do_linter(void)
struct stat lintfileinfo; struct stat lintfileinfo;
if (stat(curlint->filename, &lintfileinfo) != -1 && if (stat(curlint->filename, &lintfileinfo) != -1 &&
openfile->current_stat->st_ino != lintfileinfo.st_ino) { openfile->current_stat->st_ino != lintfileinfo.st_ino) {
#ifdef ENABLE_MULTIBUFFER #ifdef ENABLE_MULTIBUFFER
openfilestruct *tmpof = openfile->next; const openfilestruct *started_at = openfile;
while (tmpof != openfile && openfile = openfile->next;
tmpof->current_stat->st_ino != lintfileinfo.st_ino) while (openfile != started_at &&
tmpof = tmpof->next; openfile->current_stat->st_ino != lintfileinfo.st_ino)
openfile = openfile->next;
if (tmpof->current_stat->st_ino != lintfileinfo.st_ino) { if (openfile->current_stat->st_ino != lintfileinfo.st_ino) {
char *msg = charalloc(1024 + strlen(curlint->filename)); char *msg = charalloc(1024 + strlen(curlint->filename));
int i; int i;
@ -3323,8 +3324,7 @@ void do_linter(void)
free(dontwantfile); free(dontwantfile);
#ifdef ENABLE_MULTIBUFFER #ifdef ENABLE_MULTIBUFFER
} }
} else }
openfile = tmpof;
#endif #endif
} }