util: storagefile: Preserve return value in virStorageSourceParseBackingJSONUriStr

virStorageSourceParseBackingURI will report special return values in
some cases. Preserve it in virStorageSourceParseBackingJSONUriStr.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2019-08-15 16:21:55 +02:00
parent 36cde66708
commit dddc552400

View File

@ -3075,7 +3075,9 @@ virStorageSourceParseBackingJSONUriStr(virStorageSourcePtr src,
const char *uri,
int protocol)
{
if (virStorageSourceParseBackingURI(src, uri) < 0)
int rc;
if ((rc = virStorageSourceParseBackingURI(src, uri)) < 0)
return -1;
if (src->protocol != protocol) {
@ -3087,7 +3089,7 @@ virStorageSourceParseBackingJSONUriStr(virStorageSourcePtr src,
return -1;
}
return 0;
return rc;
}