From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MloWH-00051s-Pt for qemu-devel@nongnu.org; Thu, 10 Sep 2009 14:37:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MloWC-0004s6-CT for qemu-devel@nongnu.org; Thu, 10 Sep 2009 14:37:20 -0400 Received: from [199.232.76.173] (port=39208 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MloWC-0004rm-3S for qemu-devel@nongnu.org; Thu, 10 Sep 2009 14:37:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28447) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MloWB-0003Un-LB for qemu-devel@nongnu.org; Thu, 10 Sep 2009 14:37:15 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8AIbEo2027125 for ; Thu, 10 Sep 2009 14:37:14 -0400 Subject: Re: braces [was Re: [Qemu-devel] [PATCH 03/19] Remove double error message in qemu_option_set()] From: Mark McLoughlin In-Reply-To: <20090910180312.GD521@redhat.com> References: <1252595941-15196-1-git-send-email-markmc@redhat.com> <1252595941-15196-4-git-send-email-markmc@redhat.com> <20090910180312.GD521@redhat.com> Content-Type: text/plain Date: Thu, 10 Sep 2009 19:36:09 +0100 Message-Id: <1252607769.3403.62.camel@blaa> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Reply-To: Mark McLoughlin List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org On Thu, 2009-09-10 at 21:03 +0300, Michael S. Tsirkin wrote: > On Thu, Sep 10, 2009 at 04:18:45PM +0100, Mark McLoughlin wrote: > > qemu_opt_set() prints an error message in all failure cases, so > > qemu_set_option() doesn't need to print another error. > > > > Signed-off-by: Mark McLoughlin > > Same comment about {} here That's 3 of these you and Juan have found. And, genuinely, I try not to do this. Just shows how much of reflex it is. IMHO, if (blaa(foo, bar, doodah) == NULL) return -1; is far nicer than: if (blaa(foo, bar, doodah) == NULL) { return -1; } but OTOH, this: if (blaa(foo, bar, doodah) == NULL) { return doodah(foo, bar, blaa); } *is* arguably better than: if (blaa(foo, bar, doodah) == NULL) return doodah(foo, bar, blaa); There's enough of both ways in the code that I think either should be acceptable. Cheers, Mark.