Remove target_fileio_close_cleanup
authorTom Tromey <tom@tromey.com>
Fri, 23 Feb 2018 21:42:26 +0000 (14:42 -0700)
committerTom Tromey <tom@tromey.com>
Sat, 17 Mar 2018 15:22:15 +0000 (09:22 -0600)
commit770623f79f7fdff38f62c641438759748cf3f138
tree5b63468f7af228b8e18572ca954f1379fb37f770
parent04153a3e04ffcdf3a253f38676521aed4b3f22c9
Remove target_fileio_close_cleanup

This removes target_fileio_close_cleanup in favor of a new RAII class.
The new class is similar to scoped_fd but calls
target_fileio_close_cleanup rather than close.

Regression tested by the buildbot.

gdb/ChangeLog
2018-03-17  Tom Tromey  <tom@tromey.com>

* target.c (class scoped_target_fd): New.
(target_fileio_close_cleanup): Remove.
(target_fileio_read_alloc_1): Use scoped_target_fd.
gdb/ChangeLog
gdb/target.c