提交 c447086f 编写于 作者: J John Ferlan

Revert "interface: Consume @def in virInterfaceObjNew"

This reverts commit 92840eb3.

More recent reviews/changes don't have the vir*ObjNew APIs
consuming the @def, so remove from Interface as well. Changes
needed to also deal with conflicts from commit id '46f5eca4'.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
上级 b887d7b0
......@@ -74,7 +74,7 @@ virInterfaceObjDispose(void *opaque)
static virInterfaceObjPtr
virInterfaceObjNew(virInterfaceDefPtr def)
virInterfaceObjNew(void)
{
virInterfaceObjPtr obj;
......@@ -85,7 +85,6 @@ virInterfaceObjNew(virInterfaceDefPtr def)
return NULL;
virObjectLock(obj);
obj->def = def;
return obj;
}
......@@ -261,15 +260,15 @@ virInterfaceObjListAssignDef(virInterfaceObjListPtr interfaces,
return obj;
}
if (!(obj = virInterfaceObjNew(def)))
if (!(obj = virInterfaceObjNew()))
return NULL;
if (VIR_APPEND_ELEMENT_COPY(interfaces->objs,
interfaces->count, obj) < 0) {
obj->def = NULL;
virInterfaceObjEndAPI(&obj);
return NULL;
}
obj->def = def;
return virObjectRef(obj);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册