conf: Remove unnecessary condition from virDomainDiskSourceFormatInternal

Now that the function is using virXMLFormatElement we don't need to
conditionally format anything, since we'll format the element according
to the presence of content.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Peter Krempa 2018-03-05 14:52:38 +01:00
parent 9265b54d93
commit bbacd6b113

View File

@ -22832,7 +22832,6 @@ virDomainDiskSourceFormatInternal(virBufferPtr buf,
if (policy)
startupPolicy = virDomainStartupPolicyTypeToString(policy);
if (src->path || src->nhosts > 0 || src->srcpool || startupPolicy) {
switch ((virStorageType)src->type) {
case VIR_STORAGE_TYPE_FILE:
virBufferEscapeString(&attrBuf, " file='%s'", src->path);
@ -22906,7 +22905,6 @@ virDomainDiskSourceFormatInternal(virBufferPtr buf,
if (virXMLFormatElement(buf, "source", &attrBuf, &childBuf) < 0)
goto error;
}
return 0;