From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MlnzF-00053h-63 for qemu-devel@nongnu.org; Thu, 10 Sep 2009 14:03:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MlnzA-0004uv-5N for qemu-devel@nongnu.org; Thu, 10 Sep 2009 14:03:12 -0400 Received: from [199.232.76.173] (port=58381 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mlnz9-0004uO-VB for qemu-devel@nongnu.org; Thu, 10 Sep 2009 14:03:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8871) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mlnz9-000648-8w for qemu-devel@nongnu.org; Thu, 10 Sep 2009 14:03:07 -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 n8AI35AA006711 for ; Thu, 10 Sep 2009 14:03:05 -0400 Date: Thu, 10 Sep 2009 21:01:28 +0300 From: "Michael S. Tsirkin" Subject: Re: [Qemu-devel] [PATCH 02/19] Remove bogus error message from qemu_opts_set() Message-ID: <20090910180128.GB521@redhat.com> References: <1252595941-15196-1-git-send-email-markmc@redhat.com> <1252595941-15196-3-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-3-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:44PM +0100, Mark McLoughlin wrote: > The only way qemu_opts_create() can fail is if a QemuOpts with that id > already exists and fail_if_exists=1. In that case, we already print > an error which makes more sense than the one in qemu_opts_set(). > > Signed-off-by: Mark McLoughlin > --- > qemu-option.c | 5 +---- > 1 files changed, 1 insertions(+), 4 deletions(-) > > diff --git a/qemu-option.c b/qemu-option.c > index f1a666f..4d544c7 100644 > --- a/qemu-option.c > +++ b/qemu-option.c > @@ -669,11 +669,8 @@ int qemu_opts_set(QemuOptsList *list, const char *id, > QemuOpts *opts; > > opts = qemu_opts_create(list, id, 1); > - if (opts == NULL) { > - fprintf(stderr, "id \"%s\" not found for \"%s\"\n", > - id, list->name); > + if (opts == NULL) > return -1; > - } I thought we are supposed to keep {} around? Yes I hate this too. > return qemu_opt_set(opts, name, value); > } > > -- > 1.6.2.5 > >