From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mlo0u-0007Ml-9o for qemu-devel@nongnu.org; Thu, 10 Sep 2009 14:04:56 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mlo0p-0007HB-5m for qemu-devel@nongnu.org; Thu, 10 Sep 2009 14:04:55 -0400 Received: from [199.232.76.173] (port=58447 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mlo0o-0007Gs-Ug for qemu-devel@nongnu.org; Thu, 10 Sep 2009 14:04:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12190) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mlo0o-0006Sa-AK for qemu-devel@nongnu.org; Thu, 10 Sep 2009 14:04:50 -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 n8AI4nZ3016162 for ; Thu, 10 Sep 2009 14:04:49 -0400 Date: Thu, 10 Sep 2009 21:03:12 +0300 From: "Michael S. Tsirkin" Subject: Re: [Qemu-devel] [PATCH 03/19] Remove double error message in qemu_option_set() Message-ID: <20090910180312.GD521@redhat.com> References: <1252595941-15196-1-git-send-email-markmc@redhat.com> <1252595941-15196-4-git-send-email-markmc@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1252595941-15196-4-git-send-email-markmc@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mark McLoughlin Cc: qemu-devel@nongnu.org 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 > --- > qemu-config.c | 6 ++---- > 1 files changed, 2 insertions(+), 4 deletions(-) > > diff --git a/qemu-config.c b/qemu-config.c > index 61e6ed1..733cc24 100644 > --- a/qemu-config.c > +++ b/qemu-config.c > @@ -186,11 +186,9 @@ int qemu_set_option(const char *str) > return -1; > } > > - if (qemu_opt_set(opts, arg, str+offset+1) == -1) { > - fprintf(stderr, "failed to set \"%s\" for %s \"%s\"\n", > - arg, lists[i]->name, id); > + if (qemu_opt_set(opts, arg, str+offset+1) == -1) > return -1; > - } > + > return 0; > } > > -- > 1.6.2.5 > >