From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36837) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDG7Z-00056N-T3 for qemu-devel@nongnu.org; Wed, 06 Mar 2013 10:19:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDG7Y-0005qk-DP for qemu-devel@nongnu.org; Wed, 06 Mar 2013 10:19:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:30574) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDG7Y-0005qe-5z for qemu-devel@nongnu.org; Wed, 06 Mar 2013 10:19:08 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r26FJ73X014732 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 6 Mar 2013 10:19:07 -0500 Date: Wed, 6 Mar 2013 16:19:05 +0100 From: Kevin Wolf Message-ID: <20130306151905.GB2285@dhcp-200-207.str.redhat.com> References: <1362566886-14073-1-git-send-email-kwolf@redhat.com> <513722BD.6010503@redhat.com> <20130306111126.GA2285@dhcp-200-207.str.redhat.com> <513756D5.1020506@redhat.com> <51375B04.9020402@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51375B04.9020402@redhat.com> Subject: Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Laszlo Ersek , qemu-devel@nongnu.org, Luiz Capitulino Am 06.03.2013 um 16:04 hat Paolo Bonzini geschrieben: > Il 06/03/2013 15:46, Laszlo Ersek ha scritto: > >> > We could assert(!error_is_set(errp)) if we wanted. As soon as you've got > >> > an Error, you must return instead of calling more functions with the > >> > same error pointer. > > I think Luiz would suggest (*) to receive any error into a > > NULL-initialized local_err pointer; do the logic above on local_err, and > > just before returning, error_propagate() it to errp. > > > > (*) I hope you can see what I did there: if you disagree, you get to > > take that to Luiz, even though he didn't say anything. I'm getting > > better at working this list! :) > > I agree with Laszlo. I don't really understand the difference. As long as the function doesn't depend on the Error object to be present (which it doesn't), isn't it semantically exactly the same? Also, Markus' reply makes me think that I should restrict myself to code areas where errors are reported as -errno. That one I understand at least... Kevin