Changeset f23dbf4 in mainline for uspace/lib/math/generic/sqrt.c


Ignore:
Timestamp:
2021-06-18T16:06:17Z (3 years ago)
Author:
Maurizio Lombardi <mlombard@…>
Children:
e1fc596c
Parents:
ca113cf
git-author:
Maurizio Lombardi <mlombard@…> (2018-11-25 16:57:56)
git-committer:
Maurizio Lombardi <mlombard@…> (2021-06-18 16:06:17)
Message:

math: fix comparisons of integers with different signedness

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/math/generic/sqrt.c

    rca113cf rf23dbf4  
    158158            if((t<ix0)||((t==ix0)&&(t1<=ix1))) {
    159159                s1  = t1+r;
    160                 if(((t1&sign)==sign)&&(s1&sign)==0) s0 += 1;
     160                if(((int32_t)(t1&sign)==sign)&&(s1&sign)==0) s0 += 1;
    161161                ix0 -= t;
    162162                if (ix1 < t1) ix0 -= 1;
Note: See TracChangeset for help on using the changeset viewer.