mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-28 14:38:21 +01:00
Merge "histogram_enc.c,MyRand: s/ul/u/ for unsigned constants"
This commit is contained in:
commit
99f6f462f5
@ -599,7 +599,7 @@ static VP8LHistogram* HistogramCombineEntropyBin(
|
|||||||
// Implement a Lehmer random number generator with a multiplicative constant of
|
// Implement a Lehmer random number generator with a multiplicative constant of
|
||||||
// 48271 and a modulo constant of 2^31 − 1.
|
// 48271 and a modulo constant of 2^31 − 1.
|
||||||
static uint32_t MyRand(uint32_t* const seed) {
|
static uint32_t MyRand(uint32_t* const seed) {
|
||||||
*seed = (uint32_t)(((uint64_t)(*seed) * 48271ul) % 2147483647ul);
|
*seed = (uint32_t)(((uint64_t)(*seed) * 48271u) % 2147483647u);
|
||||||
assert(*seed > 0);
|
assert(*seed > 0);
|
||||||
return *seed;
|
return *seed;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user