gdb/
Code cleanup. * cli/cli-cmds.c (source_script_from_stream): Never fclose STREAM. Update the function comment for it. (source_script_with_search): Call make_cleanup_fclose for STREAM. * cli/cli-script.c (script_from_file): Do not call make_cleanup_fclose for STREAM.
This commit is contained in:
parent
30b91c9079
commit
86eb7e951a
3 changed files with 12 additions and 8 deletions
|
@ -1614,11 +1614,9 @@ script_from_file (FILE *stream, const char *file)
|
|||
if (stream == NULL)
|
||||
internal_error (__FILE__, __LINE__, _("called with NULL file pointer!"));
|
||||
|
||||
old_cleanups = make_cleanup_fclose (stream);
|
||||
|
||||
old_lines.old_line = source_line_number;
|
||||
old_lines.old_file = source_file_name;
|
||||
make_cleanup (source_cleanup_lines, &old_lines);
|
||||
old_cleanups = make_cleanup (source_cleanup_lines, &old_lines);
|
||||
source_line_number = 0;
|
||||
source_file_name = file;
|
||||
/* This will get set every time we read a line. So it won't stay ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue