index 8b5def4d15a9f00d90019e1362d4640137ad8b6c..83026b6dde4fbeb90dd6ee07384d0ae417a259e6 100644 (file)
(size + mult / 2) / mult);
else
{
+ /* Here we have to worry about avoiding overflow */
+ int64 val;
+
mult *= 1024;
+ val = size / mult;
+ if ((size % mult) >= (mult / 2))
+ val++;
snprintf(buf, sizeof(buf), INT64_FORMAT " TB",
- (size + mult / 2) / mult);
+ val);
}
}
}