summaryrefslogtreecommitdiff
path: root/gdb/xml-tdesc.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2008-10-28 15:22:11 +0000
committerTom Tromey <tromey@redhat.com>2008-10-28 15:22:11 +0000
commitd078c7b7e00ebbc6ada4a0cd43fc3f901ed0923f (patch)
treec529fa7ff1f9d519abf2cdcb01d4e810537026fa /gdb/xml-tdesc.c
parentc0fc6c1a94ebf1531c1180c53a177b84c99be83d (diff)
downloadgdb-d078c7b7e00ebbc6ada4a0cd43fc3f901ed0923f.tar.gz
* cli/cli-script.c (do_fclose_cleanup): Remove.
(script_from_file): Use make_cleanup_fclose. * xml-tdesc.c (do_cleanup_fclose): Remove. (fetch_xml_from_file): Use make_cleanup_fclose. * tracepoint.c (tracepoint_save_command): Use make_cleanup_fclose. Always free pathname. * source.c (print_source_lines_base): Use make_cleanup_fclose. * remote.c (fclose_cleanup): Remove. (remote_file_put): Use make_cleanup_fclose. (remote_file_get): Likewise. * linux-nat.c (linux_nat_find_memory_regions): Use make_cleanup_fclose. (linux_nat_info_proc_cmd): Likewise. (linux_proc_pending_signals): Likewise. * fbsd-nat.c (fbsd_find_memory_regions): Use make_cleanup_fclose. Free file name. * cli/cli-dump.c (do_fclose_cleanup): Remove. (make_cleanup_fclose): Remove. * defs.h (make_cleanup_fclose): Declare. * utils.c (do_fclose_cleanup): New function. (make_cleanup_fclose): Likewise.
Diffstat (limited to 'gdb/xml-tdesc.c')
-rw-r--r--gdb/xml-tdesc.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/gdb/xml-tdesc.c b/gdb/xml-tdesc.c
index 42bc4a03416..2e8c1f53781 100644
--- a/gdb/xml-tdesc.c
+++ b/gdb/xml-tdesc.c
@@ -421,14 +421,6 @@ tdesc_parse_xml (const char *document, xml_fetch_another fetcher,
#endif /* HAVE_LIBEXPAT */
-/* Close FILE. */
-
-static void
-do_cleanup_fclose (void *file)
-{
- fclose (file);
-}
-
/* Open FILENAME, read all its text into memory, close it, and return
the text. If something goes wrong, return NULL and warn. */
@@ -455,7 +447,7 @@ fetch_xml_from_file (const char *filename, void *baton)
if (file == NULL)
return NULL;
- back_to = make_cleanup (do_cleanup_fclose, file);
+ back_to = make_cleanup_fclose (file);
/* Read in the whole file, one chunk at a time. */
len = 4096;