conf: Allocate domain definition with the new helper

Use the virDomainDefNew() helper to allocate the definition instead of
doing it via VIR_ALLOC.
This commit is contained in:
Peter Krempa
2015-02-16 16:30:11 +01:00
parent 61e43ce9df
commit c03411199e
13 changed files with 16 additions and 16 deletions

View File

@@ -102,7 +102,7 @@ testReadNetworkConf(const void *data ATTRIBUTE_UNUSED)
" </devices>\n"
"</domain>\n";
if (VIR_ALLOC(def) < 0 ||
if (!(def = virDomainDefNew()) ||
VIR_STRDUP(def->os.type, "exe") < 0 ||
VIR_STRDUP(def->os.init, "/sbin/init") < 0)
goto cleanup;