summaryrefslogtreecommitdiff
path: root/src/DHTMessageFactoryImpl.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/DHTMessageFactoryImpl.cc
parent3620d271af36a210af9c83fd6b49d13940710055 (diff)
Use PRId64 for int64_t format specifier
Diffstat (limited to 'src/DHTMessageFactoryImpl.cc')
-rw-r--r--src/DHTMessageFactoryImpl.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/DHTMessageFactoryImpl.cc b/src/DHTMessageFactoryImpl.cc
index a804d983..dc4d69cf 100644
--- a/src/DHTMessageFactoryImpl.cc
+++ b/src/DHTMessageFactoryImpl.cc
@@ -183,8 +183,7 @@ void DHTMessageFactoryImpl::validatePort(const Integer* port) const
{
if(!(0 < port->i() && port->i() < UINT16_MAX)) {
throw DL_ABORT_EX
- (fmt("Malformed DHT message. Invalid port=%lld",
- static_cast<long long int>(port->i())));
+ (fmt("Malformed DHT message. Invalid port=%" PRId64 "", port->i()));
}
}
@@ -256,8 +255,8 @@ DHTMessageFactoryImpl::createResponseMessage
// for now, just report error message arrived and throw exception.
const List* e = getList(dict, DHTUnknownMessage::E);
if(e->size() == 2) {
- A2_LOG_INFO(fmt("Received Error DHT message. code=%lld, msg=%s",
- static_cast<long long int>(getInteger(e, 0)->i()),
+ A2_LOG_INFO(fmt("Received Error DHT message. code=%" PRId64 ", msg=%s",
+ getInteger(e, 0)->i(),
util::percentEncode(getString(e, 1)->s()).c_str()));
} else {
A2_LOG_DEBUG("e doesn't have 2 elements.");