summaryrefslogtreecommitdiffstats
path: root/programs/lz4io.c
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2015-04-10 13:24:13 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2015-04-10 13:24:13 (GMT)
commita2864fd49d801fb8a132fada94d319f96ad26e96 (patch)
tree35be7f336447ec5c62ebd31ab6bc0a18fc29942a /programs/lz4io.c
parent33134fb6c8aff71375f2a629d4d9856a28d930d6 (diff)
downloadlz4-a2864fd49d801fb8a132fada94d319f96ad26e96.zip
lz4-a2864fd49d801fb8a132fada94d319f96ad26e96.tar.gz
lz4-a2864fd49d801fb8a132fada94d319f96ad26e96.tar.bz2
Fixed a few minor sanitize warnings
Diffstat (limited to 'programs/lz4io.c')
-rw-r--r--programs/lz4io.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/programs/lz4io.c b/programs/lz4io.c
index 278b766..4071b1e 100644
--- a/programs/lz4io.c
+++ b/programs/lz4io.c
@@ -493,11 +493,9 @@ int LZ4IO_compressFilename(const char* input_filename, const char* output_filena
}
else
{
+ double seconds = (double)(end - start)/CLOCKS_PER_SEC;
DISPLAYLEVEL(2, "Compressed %llu bytes into %llu bytes ==> %.2f%%\n",
(unsigned long long) filesize, (unsigned long long) compressedfilesize, (double)compressedfilesize/filesize*100);
- }
- {
- double seconds = (double)(end - start)/CLOCKS_PER_SEC;
DISPLAYLEVEL(4, "Done in %.2f s ==> %.2f MB/s\n", seconds, (double)filesize / seconds / 1024 / 1024);
}
@@ -825,6 +823,7 @@ int LZ4IO_decompressFilename(const char* input_filename, const char* output_file
end = clock();
DISPLAYLEVEL(2, "\r%79s\r", "");
DISPLAYLEVEL(2, "Successfully decoded %llu bytes \n", filesize);
+ if (filesize > 0)
{
double seconds = (double)(end - start)/CLOCKS_PER_SEC;
DISPLAYLEVEL(4, "Done in %.2f s ==> %.2f MB/s\n", seconds, (double)filesize / seconds / 1024 / 1024);