mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 08:12:28 +00:00
Remove undefined behaviors
This commit is contained in:
parent
4864565198
commit
b3838173ec
51 changed files with 756 additions and 1302 deletions
|
@ -28,7 +28,7 @@ void(pabsd)(uint32_t a[4], const int32_t b[4]) {
|
|||
unsigned i;
|
||||
uint32_t r[4];
|
||||
for (i = 0; i < 4; ++i) {
|
||||
r[i] = ABS(b[i]);
|
||||
r[i] = b[i] >= 0 ? b[i] : -(uint32_t)b[i];
|
||||
}
|
||||
memcpy(a, r, 16);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue