]> Git Repo - qemu.git/commitdiff
qcow2: use Z_OK instead of 0 for deflateInit2 return code check
authorVladimir Sementsov-Ogievskiy <[email protected]>
Thu, 1 Nov 2018 18:27:32 +0000 (21:27 +0300)
committerKevin Wolf <[email protected]>
Fri, 14 Dec 2018 10:52:40 +0000 (11:52 +0100)
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

index bc8868c36a9681f0fe2829d640f38634df2278b5..ab1f7388a7e21b940ec374c688311ab698ab48df 100644 (file)
@@ -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;
     }
 
This page took 0.031899 seconds and 4 git commands to generate.