[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH v2 03/10] conf: drop 'def' from struct virDomainDefPostParseDeviceIteratorData



It's passed to all places along with the structure.
---
 src/conf/domain_conf.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index d6bd737..46820c2 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -4420,7 +4420,6 @@ virDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,


 struct virDomainDefPostParseDeviceIteratorData {
-    virDomainDefPtr def;
     virCapsPtr caps;
     virDomainXMLOptionPtr xmlopt;
     unsigned int parseFlags;
@@ -4428,13 +4427,13 @@ struct virDomainDefPostParseDeviceIteratorData {


 static int
-virDomainDefPostParseDeviceIterator(virDomainDefPtr def ATTRIBUTE_UNUSED,
+virDomainDefPostParseDeviceIterator(virDomainDefPtr def,
                                     virDomainDeviceDefPtr dev,
                                     virDomainDeviceInfoPtr info ATTRIBUTE_UNUSED,
                                     void *opaque)
 {
     struct virDomainDefPostParseDeviceIteratorData *data = opaque;
-    return virDomainDeviceDefPostParse(dev, data->def, data->caps,
+    return virDomainDeviceDefPostParse(dev, def, data->caps,
                                        data->parseFlags, data->xmlopt);
 }

@@ -4477,7 +4476,7 @@ virDomainDefPostParseInternal(virDomainDefPtr def,

         /* videos[0] might have been added in AddImplicitDevices, after we've
          * done the per-device post-parse */
-        if (virDomainDefPostParseDeviceIterator(NULL, &device, NULL, data) < 0)
+        if (virDomainDefPostParseDeviceIterator(def, &device, NULL, data) < 0)
             return -1;
     }

@@ -4496,7 +4495,6 @@ virDomainDefPostParse(virDomainDefPtr def,
 {
     int ret;
     struct virDomainDefPostParseDeviceIteratorData data = {
-        .def = def,
         .caps = caps,
         .xmlopt = xmlopt,
         .parseFlags = parseFlags,
-- 
2.8.3


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]