]> xenbits.xensource.com Git - libvirt.git/commitdiff
Revert "interface: Consume @def in virInterfaceObjNew"
authorJohn Ferlan <jferlan@redhat.com>
Sat, 29 Jul 2017 11:20:59 +0000 (07:20 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 28 Aug 2017 18:02:22 +0000 (14:02 -0400)
This reverts commit 92840eb3a7e47cdf761e52afccc41d2a35327fbd.

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: John Ferlan <jferlan@redhat.com>
src/conf/virinterfaceobj.c

index 106f2321595d73a465cb9ba622aeede6cf22c72f..e993b929d70418ae708d261d939c929b13dbf1d2 100644 (file)
@@ -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);
 }