From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MllXw-0006Fg-Le for qemu-devel@nongnu.org; Thu, 10 Sep 2009 11:26:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MllXr-0006C8-8H for qemu-devel@nongnu.org; Thu, 10 Sep 2009 11:26:51 -0400 Received: from [199.232.76.173] (port=40175 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MllXr-0006C3-1N for qemu-devel@nongnu.org; Thu, 10 Sep 2009 11:26:47 -0400 Received: from mail20.svc.cra.dublin.eircom.net ([159.134.118.221]:37313) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MllXq-00007L-6y for qemu-devel@nongnu.org; Thu, 10 Sep 2009 11:26:46 -0400 From: Mark McLoughlin Date: Thu, 10 Sep 2009 16:18:44 +0100 Message-Id: <1252595941-15196-3-git-send-email-markmc@redhat.com> In-Reply-To: <1252595941-15196-1-git-send-email-markmc@redhat.com> References: <1252595941-15196-1-git-send-email-markmc@redhat.com> Subject: [Qemu-devel] [PATCH 02/19] Remove bogus error message from qemu_opts_set() List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Mark McLoughlin 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; - } return qemu_opt_set(opts, name, value); } -- 1.6.2.5