mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 09:10:28 +00:00
Don't shift 32-bit value by more than 32 bits.
PR: 207854 Approved by: emaste
This commit is contained in:
parent
fc8ae86a8f
commit
3f791e31fd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=355980
|
@ -1468,7 +1468,7 @@ static t_Error CalcWredCurve(t_QmCgWredCurve *p_WredCurve, uint32_t *p_CurveWor
|
|||
for (tmpA=(uint32_t)(64*pres) ; tmpA<128*pres; tmpA += pres )
|
||||
for (tmpN=7 ; tmpN<64; tmpN++ )
|
||||
{
|
||||
tmp = ABS((int)(slope - tmpA/(1<<tmpN)));
|
||||
tmp = ABS((int)(slope - tmpA/(1UL<<(tmpN%32))));
|
||||
if (tmp < gap)
|
||||
{
|
||||
sa = tmpA;
|
||||
|
|
Loading…
Reference in a new issue