sched/signal/sig_nanosleep.c: Fix an error introduced with recent commit. Noted by Jussi Kivilinna.

This commit is contained in:
Gregory Nutt 2018-09-17 06:21:25 -06:00
parent d647127d14
commit 7769bd490c
3 changed files with 3 additions and 3 deletions

View File

@ -77,7 +77,7 @@ double log(double x)
{ {
y_old = y; y_old = y;
ney = exp(-y); ney = exp(-y);
y -= 1 - x * ney; y -= 1.0 - x * ney;
if (y > 700.0) if (y > 700.0)
{ {

View File

@ -74,7 +74,7 @@ float logf(float x)
{ {
y_old = y; y_old = y;
ney = expf(-y); ney = expf(-y);
y -= 1 - x * ney; y -= 1.0F - x * ney;
if (y > FLT_MAX_EXP_X) if (y > FLT_MAX_EXP_X)
{ {

View File

@ -113,7 +113,7 @@ int nxsig_nanosleep(FAR const struct timespec *rqtp,
/* Sanity check */ /* Sanity check */
if (rqtp != NULL || rqtp->tv_nsec < 0 || rqtp->tv_nsec >= 1000000000) if (rqtp == NULL || rqtp->tv_nsec < 0 || rqtp->tv_nsec >= 1000000000)
{ {
return -EINVAL; return -EINVAL;
} }