From: Guido Draheim Date: Mon, 4 Jan 2021 20:48:45 +0000 (+0100) Subject: #68 ssize_t return value of zzip_file_read is a signed value being possibly -1 X-Git-Tag: v0.13.72~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ac9ae39ef419e9f0f83da1e583314d8c7cda34a6;p=zziplib #68 ssize_t return value of zzip_file_read is a signed value being possibly -1 --- diff --git a/bins/unzzipcat-zip.c b/bins/unzzipcat-zip.c index dd78c2b..385aeaf 100644 --- a/bins/unzzipcat-zip.c +++ b/bins/unzzipcat-zip.c @@ -34,7 +34,7 @@ static void unzzip_cat_file(ZZIP_DIR* disk, char* name, FILE* out) if (file) { char buffer[1024]; int len; - while ((len = zzip_file_read (file, buffer, 1024))) + while (0 < (len = zzip_file_read (file, buffer, 1024))) { fwrite (buffer, 1, len, out); }