commit 4e14a8a9770fa1b12be00e4970aaa73ebef1197b
parent accd17c249daaa4f4a8a9e401626de80608695a4
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sat, 15 Jun 2019 14:35:53 +0200
tweaks: remove two unneeded assignments, and improve a comment
Also reshuffle a line, for esthetics.
Diffstat:
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/rcfile.c b/src/rcfile.c
@@ -577,9 +577,8 @@ void parse_one_include(char *file, syntaxtype *syntax)
opensyntax = TRUE;
lastcolor = NULL;
- /* Parse the included file fully. */
+ /* Fully parse the given syntax (as it is about to be used). */
parse_rcfile(rcstream, TRUE, FALSE);
- opensyntax = TRUE;
extra = syntax->augmentations;
@@ -599,7 +598,6 @@ void parse_one_include(char *file, syntaxtype *syntax)
free(syntax->filename);
syntax->filename = NULL;
- opensyntax = FALSE;
}
/* Expand globs in the passed name, and parse the resultant files. */
@@ -1268,8 +1266,8 @@ void parse_rcfile(FILE *rcstream, bool just_syntax, bool intros_only)
opensyntax = FALSE;
#endif
- free(buffer);
fclose(rcstream);
+ free(buffer);
lineno = 0;
return;