libm: Fixed all static analysis warnings.

This commit is contained in:
Ryan C. Gordon
2018-08-08 12:13:56 -04:00
parent c0aa626ba3
commit 550437edbe
3 changed files with 15 additions and 4 deletions

View File

@@ -154,7 +154,7 @@ int32_t attribute_hidden __ieee754_rem_pio2(double x, double *y)
}
tx[2] = z;
nx = 3;
while(tx[nx-1]==zero) nx--; /* skip zero term */
while((nx > 0) && tx[nx-1]==zero) nx--; /* skip zero term */
n = __kernel_rem_pio2(tx,y,e0,nx,2,two_over_pi);
if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;}
return n;