From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=45993 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PPYbl-0006z8-Pw for qemu-devel@nongnu.org; Mon, 06 Dec 2010 05:47:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PPYbk-00034V-NZ for qemu-devel@nongnu.org; Mon, 06 Dec 2010 05:47:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:2010) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PPYbk-00034C-F6 for qemu-devel@nongnu.org; Mon, 06 Dec 2010 05:47:48 -0500 Message-ID: <4CFCBF3F.3040308@redhat.com> Date: Mon, 06 Dec 2010 11:47:27 +0100 From: Jes Sorensen MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 1/3] Consolidate printing of block driver options References: <1291623456-3826-1-git-send-email-Jes.Sorensen@redhat.com> <1291623456-3826-2-git-send-email-Jes.Sorensen@redhat.com> <4CFCB908.8070805@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: kwolf@redhat.com, stefanha@linux.vnet.ibm.com, qemu-devel@nongnu.org On 12/06/10 11:37, Stefan Hajnoczi wrote: > On Mon, Dec 6, 2010 at 10:20 AM, Jes Sorensen wrote: >> On 12/06/10 10:32, Stefan Hajnoczi wrote: >>> On Mon, Dec 6, 2010 at 8:17 AM, wrote: >>> Why goto out2 and not just return like the bs > 1 && out_baseimg check? >> >> It is cleaner, I'd rather convert the bs_n test to do it too. > > "out2" tells me nothing and is just indirection for a return. At this > point no resources have been acquired and it is simplest to bail out > early. A consistent out path is more likely to catch issues if the code is modified later. I am not a big fan of the random mix of return vs goto out that we spray over the code.... or having help() call exit() for that matter. Cheers, Jes