Received: from eggs.gnu.org ([2001:4830:134:3::10]:45525) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuDxq-0006W6-6w for qemu-devel@nongnu.org; Thu, 05 Nov 2015 01:24:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZuDxp-0007g9-DC for qemu-devel@nongnu.org; Thu, 05 Nov 2015 01:24:02 -0500 References: <1446700754-16219-1-git-send-email-caoj.fnst@cn.fujitsu.com> From: Cao jin Message-ID: <563AF601.20104@cn.fujitsu.com> Date: Thu, 5 Nov 2015 14:24:01 +0800 MIME-Version: 1.0 In-Reply-To: <1446700754-16219-1-git-send-email-caoj.fnst@cn.fujitsu.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] object_new_with_type: remove redundant code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, afaerber@suse.de sorry for this, I am wrong at removing type_initialize. please forget it On 11/05/2015 01:19 PM, Cao jin wrote: > g_assert & type_initialize are called in object_initialize_with_type > > Signed-off-by: Cao jin > --- > qom/object.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/qom/object.c b/qom/object.c > index fc6e161..43ac2dd 100644 > --- a/qom/object.c > +++ b/qom/object.c > @@ -423,9 +423,6 @@ Object *object_new_with_type(Type type) > { > Object *obj; > > - g_assert(type != NULL); > - type_initialize(type); > - > obj = g_malloc(type->instance_size); > object_initialize_with_type(obj, type->instance_size, type); > obj->free = g_free; > -- Yours Sincerely, Cao Jin