summaryrefslogtreecommitdiff
path: root/src/HttpHeader.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-06-25 22:43:33 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-06-25 22:43:33 +0900
commit4b03634f36b05c32737aeea8ca178f53f68052e8 (patch)
treec0eff13df7c53eedf96ddf546832179f8305a8fd /src/HttpHeader.cc
parent3620d271af36a210af9c83fd6b49d13940710055 (diff)
Use PRId64 for int64_t format specifier
Diffstat (limited to 'src/HttpHeader.cc')
-rw-r--r--src/HttpHeader.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/HttpHeader.cc b/src/HttpHeader.cc
index 6f86d934..6197fd12 100644
--- a/src/HttpHeader.cc
+++ b/src/HttpHeader.cc
@@ -142,7 +142,7 @@ RangeHandle HttpHeader::getRange() const
throw DL_ABORT_EX("Content-Length must be positive");
} else if(contentLength > std::numeric_limits<off_t>::max()) {
throw DOWNLOAD_FAILURE_EXCEPTION
- (fmt(EX_TOO_LARGE_FILE, static_cast<long long int>(contentLength)));
+ (fmt(EX_TOO_LARGE_FILE, contentLength));
} else if(contentLength == 0) {
return SharedHandle<Range>(new Range());
} else {
@@ -187,16 +187,13 @@ RangeHandle HttpHeader::getRange() const
throw DL_ABORT_EX("byte-range-spec must be positive");
}
if(startByte > std::numeric_limits<off_t>::max()) {
- throw DOWNLOAD_FAILURE_EXCEPTION
- (fmt(EX_TOO_LARGE_FILE, static_cast<long long int>(startByte)));
+ throw DOWNLOAD_FAILURE_EXCEPTION(fmt(EX_TOO_LARGE_FILE, startByte));
}
if(endByte > std::numeric_limits<off_t>::max()) {
- throw DOWNLOAD_FAILURE_EXCEPTION
- (fmt(EX_TOO_LARGE_FILE, static_cast<long long int>(endByte)));
+ throw DOWNLOAD_FAILURE_EXCEPTION(fmt(EX_TOO_LARGE_FILE, endByte));
}
if(entityLength > std::numeric_limits<off_t>::max()) {
- throw DOWNLOAD_FAILURE_EXCEPTION
- (fmt(EX_TOO_LARGE_FILE, static_cast<long long int>(entityLength)));
+ throw DOWNLOAD_FAILURE_EXCEPTION(fmt(EX_TOO_LARGE_FILE, entityLength));
}
return SharedHandle<Range>(new Range(startByte, endByte, entityLength));
}