This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Remove cleanups from ser-mingw.c
- From: Simon Marchi <simark at simark dot ca>
- To: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Sun, 17 Jun 2018 23:16:30 -0400
- Subject: Re: [RFA] Remove cleanups from ser-mingw.c
- References: <20180614212047.14265-1-tom@tromey.com>
Hi Tom,
LGTM, with some nits.
On 2018-06-14 05:20 PM, Tom Tromey wrote:
> @@ -914,14 +913,12 @@ pipe_windows_open (struct serial *scb, const char *name)
> goto fail;
> scb->error_fd = fileno (pex_stderr);
>
> - scb->state = (void *) ps;
> + scb->state = (void *) ps.release ();
- I think we could remove the cast, unless you think it helps readability.
- I think we could remove the goto fail mechanism now.
>
> argv.release ();
Side note: doesn't this argv.release() look fishy to you? Who ends up owning it?
Simon