Fix warning in zlib

This commit is contained in:
Vinnie Falco
2017-07-09 13:17:12 -07:00
parent 6a46e48424
commit ff05be32af
2 changed files with 4 additions and 2 deletions

View File

@@ -3,6 +3,7 @@ Version 78:
* Add span
* Documentation work
* Use make_unique_noinit
* Fix warning in zlib
HTTP:

View File

@@ -1059,8 +1059,9 @@ doWrite(z_params& zs, boost::optional<Flush> flush, error_code& ec)
return;
}
}
else if(zs.avail_in == 0 && flush <= old_flush &&
flush != Flush::finish)
else if(zs.avail_in == 0 && (
old_flush && flush <= *old_flush
) && flush != Flush::finish)
{
/* Make sure there is something to do and avoid duplicate consecutive
* flushes. For repeated and useless calls with Flush::finish, we keep