All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH] object_new_with_type: remove redundant code
@ 2015-11-05  5:19 ` Cao jin
  0 siblings, 0 replies; 4+ messages in thread
From: Cao jin @ 2015-11-05  5:19 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, afaerber

g_assert & type_initialize are called in object_initialize_with_type

Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
---
 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;
-- 
2.1.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PATCH] object_new_with_type: remove redundant code
@ 2015-11-05  5:19 ` Cao jin
  0 siblings, 0 replies; 4+ messages in thread
From: Cao jin @ 2015-11-05  5:19 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, afaerber

g_assert & type_initialize are called in object_initialize_with_type

Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
---
 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;
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-trivial] [Qemu-devel] [PATCH] object_new_with_type: remove redundant code
  2015-11-05  5:19 ` [Qemu-devel] " Cao jin
@ 2015-11-05  6:24   ` Cao jin
  -1 siblings, 0 replies; 4+ messages in thread
From: Cao jin @ 2015-11-05  6:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, afaerber

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 <caoj.fnst@cn.fujitsu.com>
> ---
>   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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] object_new_with_type: remove redundant code
@ 2015-11-05  6:24   ` Cao jin
  0 siblings, 0 replies; 4+ messages in thread
From: Cao jin @ 2015-11-05  6:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, afaerber

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 <caoj.fnst@cn.fujitsu.com>
> ---
>   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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-05  6:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-05  5:19 [Qemu-trivial] [PATCH] object_new_with_type: remove redundant code Cao jin
2015-11-05  5:19 ` [Qemu-devel] " Cao jin
2015-11-05  6:24 ` [Qemu-trivial] " Cao jin
2015-11-05  6:24   ` Cao jin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.