Use std::numeric_limits<> for typesafe INT_MAX/etc

This commit is contained in:
Gavin Andresen
2011-12-19 17:08:25 -05:00
parent bd846c0e56
commit 26ce92b352
13 changed files with 26 additions and 34 deletions

View File

@@ -366,7 +366,7 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi
return DoS(100, error("AcceptToMemoryPool() : coinbase as individual tx"));
// To help v0.1.5 clients who would see it as a negative number
if ((int64)nLockTime > INT_MAX)
if ((int64)nLockTime > std::numeric_limits<int>::max())
return error("AcceptToMemoryPool() : not accepting nLockTime beyond 2038 yet");
// Safety limits