From: Peter Krempa Date: Thu, 15 Aug 2019 14:21:55 +0000 (+0200) Subject: util: storagefile: Preserve return value in virStorageSourceParseBackingJSONUriStr X-Git-Tag: v5.7.0-rc1~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dddc5524001310abf0246f9a27c268c351f78b13;p=thirdparty%2Flibvirt.git 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 Reviewed-by: Ján Tomko --- diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 5e02ea7bf5..56e7e5fc9e 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -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; }