asn1: Close _files output last
This commit is contained in:
@@ -356,11 +356,19 @@ close_generate (void)
|
|||||||
err(1, "writes to private header file failed");
|
err(1, "writes to private header file failed");
|
||||||
if (templatefile && fclose(templatefile) == EOF)
|
if (templatefile && fclose(templatefile) == EOF)
|
||||||
err(1, "writes to template file failed");
|
err(1, "writes to template file failed");
|
||||||
if (logfile) {
|
if (!jsonfile) abort();
|
||||||
fprintf(logfile, "\n");
|
if (fclose(jsonfile) == EOF)
|
||||||
if (fclose(logfile) == EOF)
|
err(1, "writes to JSON file failed");
|
||||||
err(1, "writes to log file failed");
|
if (!oidsfile) abort();
|
||||||
}
|
if (fclose(oidsfile) == EOF)
|
||||||
|
err(1, "writes to OIDs file failed");
|
||||||
|
if (!symsfile) abort();
|
||||||
|
if (fclose(symsfile) == EOF)
|
||||||
|
err(1, "writes to symbols file failed");
|
||||||
|
if (!logfile) abort();
|
||||||
|
fprintf(logfile, "\n");
|
||||||
|
if (fclose(logfile) == EOF)
|
||||||
|
err(1, "writes to log file failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -316,12 +316,12 @@ main(int argc, char **argv)
|
|||||||
exit(1);
|
exit(1);
|
||||||
if (!original_order)
|
if (!original_order)
|
||||||
generate_types();
|
generate_types();
|
||||||
close_generate ();
|
|
||||||
if (argc != optidx)
|
if (argc != optidx)
|
||||||
fclose(yyin);
|
fclose(yyin);
|
||||||
|
|
||||||
if (one_code_file)
|
if (one_code_file)
|
||||||
close_codefile();
|
close_codefile();
|
||||||
|
close_generate();
|
||||||
|
|
||||||
if (arg) {
|
if (arg) {
|
||||||
for (i = 1; i < len; i++)
|
for (i = 1; i < len; i++)
|
||||||
|
Reference in New Issue
Block a user