From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mlz2a-0001eG-3Q for qemu-devel@nongnu.org; Fri, 11 Sep 2009 01:51:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mlz2V-0001aw-D0 for qemu-devel@nongnu.org; Fri, 11 Sep 2009 01:51:23 -0400 Received: from [199.232.76.173] (port=50421 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mlz2V-0001ao-7a for qemu-devel@nongnu.org; Fri, 11 Sep 2009 01:51:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57606) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mlz2U-0003xl-MX for qemu-devel@nongnu.org; Fri, 11 Sep 2009 01:51:18 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8B5pHkv019704 for ; Fri, 11 Sep 2009 01:51:17 -0400 Date: Fri, 11 Sep 2009 11:20:51 +0530 From: Amit Shah Subject: Re: braces [was Re: [Qemu-devel] [PATCH 03/19] Remove double error message in qemu_option_set()] Message-ID: <20090911055051.GC31399@amit-x200.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> <1252607769.3403.62.camel@blaa> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1252607769.3403.62.camel@blaa> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mark McLoughlin Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" On (Thu) Sep 10 2009 [19:36:09], Mark McLoughlin wrote: > 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; > } BTW in patch 1 of the series you convert if (foo == NULL) to if (!foo) so maybe you'd want to be consistent in the rest of the series as well? Amit