From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGYrE-0007HA-Hl for qemu-devel@nongnu.org; Fri, 15 Mar 2013 13:55:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UGYrD-0008VU-2D for qemu-devel@nongnu.org; Fri, 15 Mar 2013 13:55:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52092) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGYrC-0008VG-Qm for qemu-devel@nongnu.org; Fri, 15 Mar 2013 13:55:54 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2FHtrXA023245 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 15 Mar 2013 13:55:53 -0400 Date: Fri, 15 Mar 2013 18:55:50 +0100 From: Kevin Wolf Message-ID: <20130315175550.GE2418@dhcp-200-207.str.redhat.com> References: <87a9qg5xjf.fsf@blackfin.pond.sub.org> <1363273057-25850-1-git-send-email-kwolf@redhat.com> <5141F224.3010108@redhat.com> <20130315083706.GD2418@dhcp-200-207.str.redhat.com> <51435285.4010300@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51435285.4010300@redhat.com> Subject: Re: [Qemu-devel] [RFC PATCH] qemu-socket: Use local error variable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com 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 > >>> --- > >>> 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