From: John Ferlan Date: Sat, 29 Jul 2017 11:20:59 +0000 (-0400) Subject: Revert "interface: Consume @def in virInterfaceObjNew" X-Git-Tag: v3.7.0-rc1~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c447086f010ffcf588ae9d3a42e48d5dd6d2c3d6;p=thirdparty%2Flibvirt.git Revert "interface: Consume @def in virInterfaceObjNew" 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 --- diff --git a/src/conf/virinterfaceobj.c b/src/conf/virinterfaceobj.c index 106f232159..e993b929d7 100644 --- a/src/conf/virinterfaceobj.c +++ b/src/conf/virinterfaceobj.c @@ -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); }