mirror of https://github.com/openssl/openssl
djgpp: Skip check for negative timeval
This causes a warning since tv_sec is unsigned. Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19322)
This commit is contained in:
parent
523e54c15c
commit
d8bcd64170
|
@ -97,8 +97,10 @@ OSSL_TIME ossl_time_from_timeval(struct timeval tv)
|
|||
{
|
||||
OSSL_TIME t;
|
||||
|
||||
#ifndef __DJGPP__ /* tv_sec is unsigned on djgpp. */
|
||||
if (tv.tv_sec < 0)
|
||||
return ossl_time_zero();
|
||||
#endif
|
||||
t.t = tv.tv_sec * OSSL_TIME_SECOND + tv.tv_usec * OSSL_TIME_US;
|
||||
return t;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue