This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 09/22] Remove last cleanup from linux-namespaces.c


On 02/27/2019 08:18 PM, Tom Tromey wrote:
> This removes the last cleanup from linux-namespaces.c, replacing it
> with a use of SCOPE_EXIT.
> 
> gdb/ChangeLog
> 2019-02-27  Tom Tromey  <tom@tromey.com>
> 
> 	* nat/linux-namespaces.c (linux_mntns_access_fs): Use SCOPE_EXIT.
> 	* common/filestuff.h (make_cleanup_close): Don't declare.
> 	* common/filestuff.c (do_close_cleanup, make_cleanup_close):
> 	Remove.

Nice.  Much simpler than the previous attempts using custom RAII types.

OK.

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]