From: Nathan Moinvaziri Date: Thu, 30 Dec 2021 04:33:08 +0000 (-0800) Subject: Fixed part of conditional expression is always true since size is always greater... X-Git-Tag: 2.1.0-beta1~463 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29b10f995f7fc0c15a5ac592bc4244b1a574216b;p=thirdparty%2Fzlib-ng.git Fixed part of conditional expression is always true since size is always greater than 0. --- diff --git a/gzwrite.c b/gzwrite.c index c4e178f9a..b3e93e8d0 100644 --- a/gzwrite.c +++ b/gzwrite.c @@ -274,7 +274,7 @@ size_t Z_EXPORT PREFIX(gzfwrite)(void const *buf, size_t size, size_t nitems, gz /* compute bytes to read -- error on overflow */ len = nitems * size; - if (size && len / size != nitems) { + if (len / size != nitems) { gz_error(state, Z_STREAM_ERROR, "request does not fit in a size_t"); return 0; }