* zzcat.c: partial fread() reads are undefined; avoid them in zzcat.

This commit is contained in:
Sam Hocevar
2008-07-16 23:17:07 +00:00
committed by sam
parent 7b03486164
commit 3c423c91de
+2 -1
View File
@@ -101,7 +101,8 @@ int main(int argc, char *argv[])
long int now;
fseek(stream, myrand() % len, SEEK_SET);
for(j = 0; j < 4; j++)
fread(data + ftell(stream), myrand() % 4096, 1, stream);
fread(data + ftell(stream),
myrand() % (len - ftell(stream)), 1, stream);
fseek(stream, myrand() % len, SEEK_SET);
now = ftell(stream);
for(j = 0; j < 16; j++)