[RFA] Remove cleanups from ser-mingw.c

Tom Tromey tom@tromey.com
Mon Jun 18 14:17:00 GMT 2018


>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:

>> -  scb->state = (void *) ps;
>> +  scb->state = (void *) ps.release ();

Simon> - I think we could remove the cast, unless you think it helps readability.
Simon> - I think we could remove the goto fail mechanism now.

Agreed on both counts, I made this change.

>> argv.release ();

Simon> Side note: doesn't this argv.release() look fishy to you?  Who ends up owning it?

It is fishy.  I looked at the history and it seems that when I added
gdb_argv here, I kept things working the same; I suppose without looking
too hard.  I looked and PEX does not seem to take ownership of the
arguments, so removing this line seems correct to me, and I've done that
in the version that I will check in.

Tom



More information about the Gdb-patches mailing list