Fix overflow bug in 'timeval2us'

This commit is contained in:
Fish (David B. Trout)
2012-12-29 12:02:20 -08:00
parent 5561645e48
commit ca7387b0c3

View File

@@ -311,7 +311,7 @@ static INLINE S64
timeval2us (const struct timeval* tv)
{
S64 result;
result = tv->tv_sec * 1000000;
result = (S64)tv->tv_sec * 1000000;
result += tv->tv_usec;
return (result);
}