[PATCH 12/26] object: check strong flag with &

Marc-André Lureau posted 26 patches 6 years, 1 month ago
[PATCH 12/26] object: check strong flag with &
Posted by Marc-André Lureau 6 years, 1 month ago
The following patch is going to introduce more flags.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 qom/object.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qom/object.c b/qom/object.c
index 1ce961b84f..9df4c14226 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -1813,7 +1813,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);
     }
-- 
2.25.0.rc1.20.g2443f3f80d.dirty