tweaks: condense a bit of code, by reusing an existing variable
parent
d4ee6a2b53
commit
e64e54d57f
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue