From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StgXD-0000QG-PG for qemu-devel@nongnu.org; Tue, 24 Jul 2012 10:56:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1StgX8-0001D8-4H for qemu-devel@nongnu.org; Tue, 24 Jul 2012 10:56:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46593) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StgX7-0001Cu-SX for qemu-devel@nongnu.org; Tue, 24 Jul 2012 10:56:22 -0400 Message-ID: <500EB78E.1050001@redhat.com> Date: Tue, 24 Jul 2012 16:56:14 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1343140218-23741-1-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1343140218-23741-1-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] qom: Reject attempts to add a property that already exists List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Markus Armbruster , Anthony Liguori , qemu-devel@nongnu.org, patches@linaro.org Il 24/07/2012 16:30, Peter Maydell ha scritto: > + ObjectProperty *prop; > + > + QTAILQ_FOREACH(prop, &obj->properties, node) { > + if (strcmp(prop->name, name) == 0) { > + /* This is always a bug in the caller */ > + fprintf(stderr, "attempt to set duplicate property %s on object\n", > + name); > + assert(0); abort(); That's all I have to say. :) Paolo > + } > + } > + > + prop = g_malloc0(sizeof(*prop));