From: Vladimir Sementsov-Ogievskiy <[email protected]> Use appropriate macro, corresponding to deflateInit2 spec.
Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]> Reviewed-by: Alberto Garcia <[email protected]> Signed-off-by: Kevin Wolf <[email protected]> --- block/qcow2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/qcow2.c b/block/qcow2.c index 991d6ac91b..225fcbde67 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -3738,7 +3738,7 @@ static ssize_t qcow2_compress(void *dest, const void *src, size_t size) memset(&strm, 0, sizeof(strm)); ret = deflateInit2(&strm, Z_DEFAULT_COMPRESSION, Z_DEFLATED, -12, 9, Z_DEFAULT_STRATEGY); - if (ret != 0) { + if (ret != Z_OK) { return -2; } -- 2.19.2
