]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fixed part of conditional expression is always true since size is always greater...
authorNathan Moinvaziri <nathan@nathanm.com>
Thu, 30 Dec 2021 04:33:08 +0000 (20:33 -0800)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Fri, 7 Jan 2022 23:08:02 +0000 (00:08 +0100)
gzwrite.c

index c4e178f9ad6272f74dec911b0b88b983465079e3..b3e93e8d0821a4b505786c09f64c4390443ff90c 100644 (file)
--- 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;
     }