Commit 51833023 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Fix minor type cast error when computing the number of blocks from the

size of the file.
parent 2bfb2a77
......@@ -862,7 +862,7 @@ main(int argc, char **argv)
pfatal("Cannot lseek to end of file");
FileInfo.fd = fd;
FileInfo.blocks = (int) roundup(fsize, BLOCKSIZE) / BLOCKSIZE;
FileInfo.blocks = (int) (roundup(fsize, (off_t)BLOCKSIZE) / BLOCKSIZE);
FileInfo.chunks = FileInfo.blocks / CHUNKSIZE;
log("Opened %s: %d blocks", filename, FileInfo.blocks);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment