1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-26 03:21:44 +03:00

storagefile: qcow1: Check for BACKING_STORE_OK

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>
This commit is contained in:
Cole Robinson 2019-10-04 17:57:32 -04:00
parent 285adba549
commit 9f508ec7ca

View 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;
}