[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH] qemu-socket: Use local error variable
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [RFC PATCH] qemu-socket: Use local error variable |
Date: |
Fri, 15 Mar 2013 18:55:50 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 15.03.2013 um 17:55 hat Laszlo Ersek geschrieben:
> On 03/15/13 09:37, Kevin Wolf wrote:
> > Am 14.03.2013 um 16:52 hat Laszlo Ersek geschrieben:
> >> On 03/14/13 15:57, Kevin Wolf wrote:
> >>> Signed-off-by: Kevin Wolf <address@hidden>
> >>> ---
> >>> After rebasing this I saw that Anthony already committed a fix that is
> >>> very close to my v1. I don't intend to actually change that code, but as
> >>> I've already done this, just for comparison what it would look like with
> >>> error propagation. Is this what you meant? I find the result more
> >>> confusing, to be honest.
> >>
> >> I think what I had in mind was:
> >> - I was okay with the logic change you suggested in your v1, just
> >> - turn *errp accesses into local_err accesses,
> >> - when returning, propagate the latter to the former.
> >>
> >> The logic seemed OK, I just suggested to keep the massage internal to
> >> the function, only try to propagate it outwards at return time. IOW,
> >> never read *errp.
> >
> > So you would have used my local_err, but not ret_err?
>
> Something like that, yes.
>
> > I don't think that
> > would make it much better,
>
> Not contesting that ;)
>
> > ret_err is actually the nice part.
>
> Anyway I'm not feeling strongly about this and I don't want to waste
> your time with it. It was just a note in passing. (... Which I should
> probably refrain from, lest I waste people's time.)
I'm not going to change this instance anyway now that Anthony pushed his
own fix instead of mine.
However this won't be the last time that I have to deal with an Error
object, so I thought I'd check what is good practice. Seems no such
thing has established yet, which is an answer, even though not the one I
was hoping for.
Kevin
- Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure, (continued)
- Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure, Markus Armbruster, 2013/03/06
- Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure, Paolo Bonzini, 2013/03/06
- [Qemu-devel] [RFC PATCH] qemu-socket: Use local error variable, Kevin Wolf, 2013/03/14
- Re: [Qemu-devel] [RFC PATCH] qemu-socket: Use local error variable, Laszlo Ersek, 2013/03/14
- Re: [Qemu-devel] [RFC PATCH] qemu-socket: Use local error variable, Kevin Wolf, 2013/03/15
- Re: [Qemu-devel] [RFC PATCH] qemu-socket: Use local error variable, Laszlo Ersek, 2013/03/15
- Re: [Qemu-devel] [RFC PATCH] qemu-socket: Use local error variable,
Kevin Wolf <=
- Re: [Qemu-devel] [RFC PATCH] qemu-socket: Use local error variable, Laszlo Ersek, 2013/03/15
- Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure, Luiz Capitulino, 2013/03/19
- Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure, Kevin Wolf, 2013/03/20
- Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure, Luiz Capitulino, 2013/03/20
- Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure, Kevin Wolf, 2013/03/20
- Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure, Luiz Capitulino, 2013/03/20
- Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure, Markus Armbruster, 2013/03/06
[Qemu-devel] Error ** parameter conventions (was: [PATCH] qemu-sockets: Fix assertion failure), Markus Armbruster, 2013/03/06