ecore: remove float comparison warning from Ecore_Pipe.

This commit is contained in:
Cedric BAIL 2016-12-19 16:31:21 -08:00
parent fa66613ed0
commit 172c07d5cd
1 changed files with 17 additions and 17 deletions

View File

@ -427,26 +427,26 @@ _ecore_pipe_wait(Ecore_Pipe *p,
if (wait >= 0.0) if (wait >= 0.0)
{ {
/* finite() tests for NaN, too big, too small, and infinity. */ /* finite() tests for NaN, too big, too small, and infinity. */
if ((!ECORE_FINITE(timeout)) || (timeout == 0.0)) if ((!ECORE_FINITE(timeout)) || (EINA_FLT_CMP(timeout, 0.0)))
{ {
tv.tv_sec = 0; tv.tv_sec = 0;
tv.tv_usec = 0; tv.tv_usec = 0;
} }
else if (timeout > 0.0) else if (timeout > 0.0)
{ {
int sec, usec; int sec, usec;
#ifdef FIX_HZ #ifdef FIX_HZ
timeout += (0.5 / HZ); timeout += (0.5 / HZ);
sec = (int)timeout; sec = (int)timeout;
usec = (int)((timeout - (double)sec) * 1000000); usec = (int)((timeout - (double)sec) * 1000000);
#else #else
sec = (int)timeout; sec = (int)timeout;
usec = (int)((timeout - (double)sec) * 1000000); usec = (int)((timeout - (double)sec) * 1000000);
#endif #endif
tv.tv_sec = sec; tv.tv_sec = sec;
tv.tv_usec = usec; tv.tv_usec = usec;
} }
t = &tv; t = &tv;
} }
else else
{ {