qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 07/41] qcow2: use Z_OK instead of 0 for deflateInit2


From: Kevin Wolf
Subject: [Qemu-devel] [PULL 07/41] qcow2: use Z_OK instead of 0 for deflateInit2 return code check
Date: Wed, 12 Dec 2018 14:27:01 +0100

From: Vladimir Sementsov-Ogievskiy <address@hidden>

Use appropriate macro, corresponding to deflateInit2 spec.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]