]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
storagefile: qcow1: Check for BACKING_STORE_OK
authorCole Robinson <crobinso@redhat.com>
Fri, 4 Oct 2019 21:57:32 +0000 (17:57 -0400)
committerCole Robinson <crobinso@redhat.com>
Fri, 11 Oct 2019 17:41:21 +0000 (13:41 -0400)
Check explicitly for BACKING_STORE_OK and not its 0 value

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
src/util/virstoragefile.c

index 51726006e7fd07e6177f1f987fef77cb2bfcc0f3..1549067c48c243a1ef723b18531b00e46dd6ca68 100644 (file)
@@ -578,7 +578,7 @@ qcow1GetBackingStore(char **res,
      * used to store backing format */
     *format = VIR_STORAGE_FILE_AUTO;
     ret = qcowXGetBackingStore(res, NULL, buf, buf_size, false);
-    if (ret == 0 && *buf == '\0')
+    if (ret == BACKING_STORE_OK && *buf == '\0')
         *format = VIR_STORAGE_FILE_NONE;
     return ret;
 }