lib: Don't force the key argument when deleting metadata

virDomainSetMetadata when operating on the metadata element was
requesting the @key argument to be passed even if @metadata was NULL
used to delete the corresponding metadata element. This is not needed as
the key is only used when adding the element and matching is done via
the XML namespace.
This commit is contained in:
Peter Krempa 2013-09-10 11:25:55 +02:00
parent 73bfac0e71
commit 3b6784d119

View File

@ -10739,7 +10739,8 @@ virDomainSetMetadata(virDomainPtr domain,
break;
case VIR_DOMAIN_METADATA_ELEMENT:
virCheckNonNullArgGoto(uri, error);
virCheckNonNullArgGoto(key, error);
if (metadata)
virCheckNonNullArgGoto(key, error);
break;
default:
/* For future expansion */