aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2008-10-28 15:22:13 +0000
committerTom Tromey <tromey@redhat.com>2008-10-28 15:22:13 +0000
commit7c8a8b0498cb16b1a36e3210977eae12cca98f64 (patch)
tree276b941fb714e325a2f0f9c2f3ec245e7208751f /gdb/xml-tdesc.c
parentdaily update (diff)
downloadbinutils-gdb-7c8a8b0498cb16b1a36e3210977eae12cca98f64.tar.gz
binutils-gdb-7c8a8b0498cb16b1a36e3210977eae12cca98f64.tar.bz2
binutils-gdb-7c8a8b0498cb16b1a36e3210977eae12cca98f64.zip
* 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;