mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-03 17:58:30 +00:00
Remove undefined behaviors
This commit is contained in:
parent
4864565198
commit
b3838173ec
51 changed files with 756 additions and 1302 deletions
4
third_party/gdtoa/g_xfmt_p.c
vendored
4
third_party/gdtoa/g_xfmt_p.c
vendored
|
@ -75,8 +75,8 @@ g_xfmt_p(char *buf, void *V, int ndig, size_t bufsize, int nik)
|
|||
|
||||
L = (UShort *)V;
|
||||
sign = L[_0] & 0x8000;
|
||||
bits[1] = (L[_1] << 16) | L[_2];
|
||||
bits[0] = (L[_3] << 16) | L[_4];
|
||||
bits[1] = ((ULong)L[_1] << 16) | L[_2];
|
||||
bits[0] = ((ULong)L[_3] << 16) | L[_4];
|
||||
if ( (ex = L[_0] & 0x7fff) !=0) {
|
||||
if (ex == 0x7fff) {
|
||||
/* Infinity or NaN */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue