diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2018-11-01 21:27:32 +0300 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2018-12-14 11:52:40 +0100 |
commit | 19a44488532eeccb522c6ee6c36f08b6c69809b0 (patch) | |
tree | d4a1900b424669943c000793f93a1e8e80f688f8 | |
parent | 3a75187fd878be685e38d94583aa14bb87b892e9 (diff) |
qcow2: use Z_OK instead of 0 for deflateInit2 return code check
Use appropriate macro, corresponding to deflateInit2 spec.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r-- | block/qcow2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/qcow2.c b/block/qcow2.c index bc8868c36a..ab1f7388a7 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; } |