summaryrefslogtreecommitdiff
path: root/src/SingleFileAllocationIterator.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-12-07 22:57:34 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-12-09 21:39:43 +0900
commit12988e5282ef52a2806cbaca9f4074698f35e399 (patch)
tree7a8d5a65a8e8478ba5855e84a1077baee1a2028d /src/SingleFileAllocationIterator.cc
parentf25e67b0178511b26d55642f215a095321a169a8 (diff)
Replaced uint64_t with off_t or int64_t.
Since off_t is int64_t with LFS, we cannot take advantage of extra capacity of uint64_t.
Diffstat (limited to 'src/SingleFileAllocationIterator.cc')
-rw-r--r--src/SingleFileAllocationIterator.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/SingleFileAllocationIterator.cc b/src/SingleFileAllocationIterator.cc
index fb72da8a..5a1d5598 100644
--- a/src/SingleFileAllocationIterator.cc
+++ b/src/SingleFileAllocationIterator.cc
@@ -51,7 +51,7 @@ namespace aria2 {
SingleFileAllocationIterator::SingleFileAllocationIterator
(BinaryStream* stream,
off_t offset,
- uint64_t totalLength)
+ off_t totalLength)
: stream_(stream),
offset_(offset),
totalLength_(totalLength),
@@ -90,7 +90,7 @@ void SingleFileAllocationIterator::allocateChunk()
stream_->writeData(buffer_, BUFSIZE, offset_);
offset_ += BUFSIZE;
- if(totalLength_ < (uint64_t)offset_) {
+ if(totalLength_ < offset_) {
stream_->truncate(totalLength_);
offset_ = totalLength_;
}
@@ -98,7 +98,7 @@ void SingleFileAllocationIterator::allocateChunk()
bool SingleFileAllocationIterator::finished()
{
- return (uint64_t)offset_ == totalLength_;
+ return offset_ == totalLength_;
}
} // namespace aria2