[libvirt] [PATCH 3/4] conf: make virDomainControllerFindUnusedIndex() more generally usable

Laine Stump laine at laine.org
Wed May 11 14:58:52 UTC 2016

This patch declares virDomainControllerFindUnusedIndex() near the top
of its file so that it can be used by other functions higher up in the
file, as well as making the DomainDef a const* so that functions which
only have a const* to the domain can use it.
 src/conf/domain_conf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 571b7bf..728949b 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -830,6 +830,7 @@ static virClassPtr virDomainObjClass;
 static virClassPtr virDomainXMLOptionClass;
 static void virDomainObjDispose(void *obj);
 static void virDomainXMLOptionClassDispose(void *obj);
+static int  virDomainControllerFindUnusedIndex(virDomainDef const *def, int type);
 static int virDomainObjOnceInit(void)
@@ -13684,7 +13685,7 @@ virDomainControllerFind(const virDomainDef *def,
 static int
-virDomainControllerFindUnusedIndex(virDomainDefPtr def, int type)
+virDomainControllerFindUnusedIndex(virDomainDef const *def, int type)
     int idx = 0;

More information about the libvir-list mailing list