mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2024-12-04 10:44:46 +02:00
We should check only negative return values
This commit is contained in:
parent
cf6e7445e5
commit
a0ec849b4a
@ -69,7 +69,7 @@ do_compress(void* dst, size_t dst_size, void const* src, size_t src_size,
|
||||
{
|
||||
int32 ret;
|
||||
ret = zlib_compress(dst, dst_size, src, src_size, level);
|
||||
if (ret != Z_OK && errormsg)
|
||||
if (ret < Z_OK && errormsg)
|
||||
*errormsg = zError(ret);
|
||||
return ret;
|
||||
}
|
||||
@ -99,7 +99,7 @@ do_decompress(void* dst, size_t dst_size, void const* src, size_t src_size,
|
||||
{
|
||||
int32 ret;
|
||||
ret = zlib_decompress(dst, dst_size, src, src_size);
|
||||
if (ret != Z_OK && errormsg)
|
||||
if (ret < Z_OK && errormsg)
|
||||
*errormsg = zError(ret);
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user