summaryrefslogtreecommitdiff
path: root/src/AdaptiveFileAllocationIterator.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-06-21 18:04:30 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-06-21 19:29:54 +0900
commit318c804504e32b7a0bbdbb35336d2e918000d80a (patch)
treefad396aee04c44a29ee79b33e1675db2275146c0 /src/AdaptiveFileAllocationIterator.cc
parent8ba9b0474747185708a25943fb6d2f97b3d9b17f (diff)
Use user-defined literal for k, m, and g (powers of 1024)
Diffstat (limited to 'src/AdaptiveFileAllocationIterator.cc')
-rw-r--r--src/AdaptiveFileAllocationIterator.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/AdaptiveFileAllocationIterator.cc b/src/AdaptiveFileAllocationIterator.cc
index 36a2e928..f86517a8 100644
--- a/src/AdaptiveFileAllocationIterator.cc
+++ b/src/AdaptiveFileAllocationIterator.cc
@@ -61,8 +61,8 @@ void AdaptiveFileAllocationIterator::allocateChunk()
try {
A2_LOG_DEBUG("Testing file system supports fallocate.");
if(offset_ < totalLength_) {
- int64_t len = std::min(totalLength_-offset_,
- static_cast<int64_t>(4096));
+ int64_t len =
+ std::min(totalLength_ - offset_, static_cast<int64_t>(4_k));
stream_->allocate(offset_, len, false);
offset_ += len;
}