From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53471) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9Gfm-0002tM-0q for qemu-devel@nongnu.org; Thu, 08 Jan 2015 12:15:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y9Gfg-00076q-Cx for qemu-devel@nongnu.org; Thu, 08 Jan 2015 12:15:01 -0500 Received: from mail-we0-x22b.google.com ([2a00:1450:400c:c03::22b]:37043) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9Gfg-00076l-5H for qemu-devel@nongnu.org; Thu, 08 Jan 2015 12:14:56 -0500 Received: by mail-we0-f171.google.com with SMTP id u56so3650777wes.2 for ; Thu, 08 Jan 2015 09:14:55 -0800 (PST) Sender: Paolo Bonzini Message-ID: <54AEBB0B.7090801@redhat.com> Date: Thu, 08 Jan 2015 18:14:51 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] qemu_opt_get_bool_helper: Fix option handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michal Privoznik , qemu-devel@nongnu.org Cc: stefanha@redhat.com, marcel.a@redhat.com On 08/01/2015 17:09, Michal Privoznik wrote: > diff --git a/util/qemu-option.c b/util/qemu-option.c > index a708241..478420f 100644 > --- a/util/qemu-option.c > +++ b/util/qemu-option.c > @@ -384,7 +384,6 @@ static bool qemu_opt_get_bool_helper(QemuOpts *opts, const char *name, > } > return ret; > } > - assert(opt->desc && opt->desc->type == QEMU_OPT_BOOL); > ret = opt->value.boolean; > if (del) { > qemu_opt_del_all(opts, name); > opt->value.boolean is not initialized correctly if opt->desc is NULL. See how it is assigned in qemu_opt_parse. Paolo