]> 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:53:50 +0000 (21:53 +0100)
committerGuido Draheim <guidod@gmx.de>
Mon, 4 Jan 2021 20:53:50 +0000 (21:53 +0100)
bins/unzzipshow.c

index 9d8c2edc7fb45ca9f9adf1c3717ed024c4f4c1be..5672d3bf9b7c63126d39b3b04f0efe86f5c6988f 100644 (file)
@@ -22,7 +22,7 @@ static void zzip_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)))
            fwrite (buffer, len, 1, out);
 
        zzip_entry_fclose (file);
@@ -35,7 +35,7 @@ static void zzip_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);