diff mbox series

[PULL,42/59] object: check strong flag with &

Message ID 1579787342-27146-43-git-send-email-pbonzini@redhat.com
State New
Headers show
Series [PULL,01/59] cpu: Introduce cpu_class_set_parent_reset() | expand

Commit Message

Paolo Bonzini Jan. 23, 2020, 1:48 p.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

The following patch is going to introduce more flags.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20200110153039.1379601-13-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 qom/object.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/qom/object.c b/qom/object.c
index 30c4f82..fb80013 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -1822,7 +1822,7 @@  static void object_set_link_property(Object *obj, Visitor *v,
     }
 
     *child = new_target;
-    if (prop->flags == OBJ_PROP_LINK_STRONG) {
+    if (prop->flags & OBJ_PROP_LINK_STRONG) {
         object_ref(new_target);
         object_unref(old_target);
     }