Replace INT_MAX with INT32_MAX to avoid compile err
authorCryptoManiac <CryptoManiac@users.noreply.github.com>
Sat, 27 Dec 2014 06:25:54 +0000 (09:25 +0300)
committerCryptoManiac <CryptoManiac@users.noreply.github.com>
Sat, 27 Dec 2014 06:25:54 +0000 (09:25 +0300)
ors

https://bitcointalk.org/index.php?topic=704756.msg9953796#msg9953796

src/stun.cpp

index 1ab2bc7..c1c7d6e 100644 (file)
@@ -343,10 +343,10 @@ static uint64_t randfiller = GetRand(UINT64_MAX);
 static void stun_req_id(struct stun_header *req)
 {
     const uint64_t *S_block = (const uint64_t *)StunSrvList;
-    req->id.id[0] = GetRandInt(INT_MAX);
-    req->id.id[1] = GetRandInt(INT_MAX);
-    req->id.id[2] = GetRandInt(INT_MAX);
-    req->id.id[3] = GetRandInt(INT_MAX);
+    req->id.id[0] = GetRandInt(INT32_MAX);
+    req->id.id[1] = GetRandInt(INT32_MAX);
+    req->id.id[2] = GetRandInt(INT32_MAX);
+    req->id.id[3] = GetRandInt(INT32_MAX);
 
     req->id.id[0] |= 0x55555555;
     req->id.id[1] &= 0x55555555;