tweaks: condense a bit of code, by reusing an existing variable

master
Benno Schulenberg 2020-05-01 11:40:18 +02:00
parent d4ee6a2b53
commit e64e54d57f
1 changed files with 3 additions and 6 deletions

View File

@ -1973,12 +1973,9 @@ bool write_file(const char *name, FILE *thefile, bool tmp,
/* If the syntax changed, discard and recompute the multidata. */
if (strcmp(oldname, newname) != 0) {
linestruct *lin = openfile->filetop;
while (lin != NULL) {
free(lin->multidata);
lin->multidata = NULL;
lin = lin->next;
for (line = openfile->filetop; line != NULL; line = line->next) {
free(line->multidata);
line->multidata = NULL;
}
precalc_multicolorinfo();