From b10c6ee0b9c8428f9ed426357a58aa42ee14cbfe Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 15 Sep 2017 22:40:40 +0300 Subject: Fix code style. --- src/net/eathena/mail2recv.cpp | 2 +- src/net/ipc.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/net') diff --git a/src/net/eathena/mail2recv.cpp b/src/net/eathena/mail2recv.cpp index 536425386..1afb69d16 100644 --- a/src/net/eathena/mail2recv.cpp +++ b/src/net/eathena/mail2recv.cpp @@ -346,7 +346,7 @@ void Mail2Recv::processMailListPage(Net::MessageIn &msg) mail->type = static_cast( msg.readUInt8("type")); mail->sender = msg.readString(24, "sender name"); - mail->time = cur_time - msg.readInt32("reg time"); + mail->time = CAST_S32(cur_time - msg.readInt32("reg time")); mail->strTime = timeToStr(mail->time); mail->expireTime = msg.readInt32("expire time"); mail->title = msg.readString(-1, "title"); diff --git a/src/net/ipc.cpp b/src/net/ipc.cpp index 407f8ca3b..2f910eaed 100644 --- a/src/net/ipc.cpp +++ b/src/net/ipc.cpp @@ -165,8 +165,9 @@ void IPC::start() return; unsigned short port(44007); - if (getenv("IPC_PORT") != nullptr) - port = static_cast(atoi(getenv("IPC_PORT"))); + const char *const portStr = getenv("IPC_PORT"); + if (portStr != nullptr) + port = static_cast(atoi(portStr)); logger->log("Starting IPC..."); ipc = new IPC; -- cgit v1.2.3-60-g2f50