This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 09/22] Remove last cleanup from linux-namespaces.c
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Wed, 6 Mar 2019 21:07:28 +0000
- Subject: Re: [PATCH v2 09/22] Remove last cleanup from linux-namespaces.c
- References: <20190227201849.32210-1-tom@tromey.com> <20190227201849.32210-10-tom@tromey.com>
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