qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH RFC 3/4] aio: Introduce aio_context_setup


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH RFC 3/4] aio: Introduce aio_context_setup
Date: Wed, 8 Jul 2015 11:51:08 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Wed, Jul 08, 2015 at 09:15:57AM +0800, Fam Zheng wrote:
> On Tue, 07/07 15:35, Stefan Hajnoczi wrote:
> > On Tue, Jun 30, 2015 at 09:19:44PM +0800, Fam Zheng wrote:
> > > diff --git a/async.c b/async.c
> > > index 06971f4..1d70cfd 100644
> > > --- a/async.c
> > > +++ b/async.c
> > > @@ -290,12 +290,17 @@ AioContext *aio_context_new(Error **errp)
> > >  {
> > >      int ret;
> > >      AioContext *ctx;
> > > +    Error *local_err = NULL;
> > > +
> > >      ctx = (AioContext *) g_source_new(&aio_source_funcs, 
> > > sizeof(AioContext));
> > > +    aio_context_setup(ctx, &local_err);
> > > +    if (local_err) {
> > > +        error_propagate(errp, local_err);
> > 
> > Is there any reason to introduce local_err?  errp can be passed directly
> > into aio_context_setup().
> 
> It's used for catching failure of aio_context_setup, because the convention is
> errp can be NULL.

You are right, I missed that aio_context_setup() has a void return type.

Attachment: pgpx8_4F3aOLO.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]