Change type from int to int64_t

This commit is contained in:
meloƞ 2024-05-08 15:39:46 +02:00
parent 2b6f5641d6
commit aec0dc9e0e
4 changed files with 6 additions and 6 deletions

View file

@ -2613,7 +2613,7 @@ int net_socket_read_wait(NETSOCKET sock, int time)
return 0;
}
int time_timestamp()
int64_t time_timestamp()
{
return time(0);
}

View file

@ -698,7 +698,7 @@ int64_t time_freq();
*
* @return The time as a UNIX timestamp
*/
int time_timestamp();
int64_t time_timestamp();
/**
* Retrieves the hours since midnight (0..23)

View file

@ -217,7 +217,7 @@ int CNetBan::Ban(T *pBanPool, const typename T::CDataType *pData, int Seconds, c
return -1;
}
int Stamp = Seconds > 0 ? time_timestamp() + Seconds : CBanInfo::EXPIRES_NEVER;
int64_t Stamp = Seconds > 0 ? time_timestamp() + Seconds : static_cast<int64_t>(CBanInfo::EXPIRES_NEVER);
// set up info
CBanInfo Info = {0};
@ -290,7 +290,7 @@ void CNetBan::Init(IConsole *pConsole, IStorage *pStorage)
void CNetBan::Update()
{
int Now = time_timestamp();
int64_t Now = time_timestamp();
// remove expired bans
char aBuf[256], aNetStr[256];
@ -522,7 +522,7 @@ void CNetBan::ConBansSave(IConsole::IResult *pResult, void *pUser)
return;
}
int Now = time_timestamp();
int64_t Now = time_timestamp();
char aAddrStr1[NETADDR_MAXSTRSIZE], aAddrStr2[NETADDR_MAXSTRSIZE];
for(CBanAddr *pBan = pThis->m_BanAddrPool.First(); pBan; pBan = pBan->m_pNext)
{

View file

@ -79,7 +79,7 @@ protected:
EXPIRES_NEVER = -1,
REASON_LENGTH = 64,
};
int m_Expires;
int64_t m_Expires;
char m_aReason[REASON_LENGTH];
};