[libvirt] [PATCH] testutils: Remove unneeded variable

Martin Kletzander posted 1 patch 6 years, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/64bebb2ba4033a3a1d9b040f9db560d84cb6ac10.1500904402.git.mkletzan@redhat.com
tests/testutils.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
[libvirt] [PATCH] testutils: Remove unneeded variable
Posted by Martin Kletzander 6 years, 8 months ago
virDomainXMLOptionNew() gladly accepts NULL and it is used in some
drivers.  There is no need for additional variable with no members set

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
---
Pushed as trivial.

 tests/testutils.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tests/testutils.c b/tests/testutils.c
index f45596997d6d..ed01136a07c1 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -1130,13 +1130,11 @@ virCapsPtr virTestGenericCapsInit(void)
 static virDomainDefParserConfig virTestGenericDomainDefParserConfig = {
     .features = VIR_DOMAIN_DEF_FEATURE_INDIVIDUAL_VCPUS,
 };
-static virDomainXMLPrivateDataCallbacks virTestGenericPrivateDataCallbacks;

 virDomainXMLOptionPtr virTestGenericDomainXMLConfInit(void)
 {
     return virDomainXMLOptionNew(&virTestGenericDomainDefParserConfig,
-                                 &virTestGenericPrivateDataCallbacks,
-                                 NULL, NULL, NULL);
+                                 NULL, NULL, NULL, NULL);
 }


--
2.13.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list