]> granicus.if.org Git - zziplib/commitdiff
#68 return value of zzip_entry_fread is signed
authorGuido Draheim <guidod@gmx.de>
Mon, 4 Jan 2021 20:51:12 +0000 (21:51 +0100)
committerGuido Draheim <guidod@gmx.de>
Mon, 4 Jan 2021 20:51:12 +0000 (21:51 +0100)
bins/unzzipcat-big.c

index 111ef47f36a17f41689e99b48b07c6f25227da79..ecebe11e63d34fedf089eec58586a4af4b3737d3 100644 (file)
@@ -26,7 +26,7 @@ static void unzzip_big_entry_fprint(ZZIP_ENTRY* entry, FILE* out)
     if (file) 
     {
        char buffer[1024]; int len;
-       while ((len = zzip_entry_fread (buffer, 1024, 1, file)))
+       while (0 < (len = zzip_entry_fread (buffer, 1024, 1, file)))
        {
            DBG2("entry read %i", len);
            fwrite (buffer, len, 1, out);
@@ -45,7 +45,7 @@ static void unzzip_cat_file(FILE* disk, char* name, FILE* out)
     if (file) 
     {
        char buffer[1024]; int len;
-       while ((len = zzip_entry_fread (buffer, 1024, 1, file)))
+       while (0 < (len = zzip_entry_fread (buffer, 1024, 1, file)))
            fwrite (buffer, len, 1, out);
        
        zzip_entry_fclose (file);