mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-17 03:03:23 +02:00
use #ifdef POCO_LONG_IS_64_BIT instead of if (sizeof(... to avoid warnings
This commit is contained in:
@@ -739,11 +739,11 @@ generate_hash_secret_salt(XML_Parser parser)
|
|||||||
platform_gather_time_entropy() ^ platform_getpid() ^ (unsigned long)parser;
|
platform_gather_time_entropy() ^ platform_getpid() ^ (unsigned long)parser;
|
||||||
|
|
||||||
/* Factors are 2^31-1 and 2^61-1 (Mersenne primes M31 and M61) */
|
/* Factors are 2^31-1 and 2^61-1 (Mersenne primes M31 and M61) */
|
||||||
if (sizeof(unsigned long) == 4) {
|
#ifdef POCO_LONG_IS_64_BIT
|
||||||
return entropy * 2147483647;
|
return entropy * 2305843009213693951ULL;
|
||||||
} else {
|
#else
|
||||||
return entropy * 2305843009213693951ULL;
|
return entropy * 2147483647;
|
||||||
}
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static XML_Bool /* only valid for root parser */
|
static XML_Bool /* only valid for root parser */
|
||||||
|
Reference in New Issue
Block a user