[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/5] libports: fix error handling in _ports_create_port_inter
From: |
Neal H. Walfield |
Subject: |
Re: [PATCH 3/5] libports: fix error handling in _ports_create_port_internal |
Date: |
Fri, 25 Oct 2013 16:55:54 +0200 |
User-agent: |
Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
At Fri, 25 Oct 2013 15:54:43 +0200,
Justus Winter wrote:
>
> Quoting Thomas Schwinge (2013-10-25 15:27:10)
> > > --- a/libports/create-internal.c
> > > +++ b/libports/create-internal.c
> > > @@ -109,10 +109,11 @@ _ports_create_port_internal (struct port_class
> > > *class,
> > > err = EINTR;
> > > lose:
> > > pthread_mutex_unlock (&_ports_lock);
> > > + error_t e;
> > > lose_unlocked:
> > > - err = mach_port_mod_refs (mach_task_self (), port,
> > > - MACH_PORT_RIGHT_RECEIVE, -1);
> > > - assert_perror (err);
> > > + e = mach_port_mod_refs (mach_task_self (), port,
> > > + MACH_PORT_RIGHT_RECEIVE, -1);
> > > + assert_perror (e);
> > > free (pi);
> > >
> > > return err;
> >
> > OK, but I suggest to move the definition of e after the lose_unlocked
> > label,
>
> I know it looks strange, but what you're suggesting is not
> possible. Labels can only be placed in front of a statement and a
> declaration is not a statement. Well, that's what gcc told me...
You can do: lose:;
[PATCH 2/5] exec: Remove the remaining BFD related bits, Justus Winter, 2013/10/25
Re: [PATCH 1/5] Makeconf: add -fno-strict-aliasing to CFLAGS, Thomas Schwinge, 2013/10/25