diff options
-rw-r--r-- | lib/multi.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/multi.c b/lib/multi.c index ee5e76ee9..2be553bdb 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -2568,15 +2568,12 @@ void Curl_expire(struct SessionHandle *data, long milli) } else { struct timeval set; - int rest; set = Curl_tvnow(); set.tv_sec += milli/1000; set.tv_usec += (milli%1000)*1000; - rest = (int)(set.tv_usec - 1000000); - if(rest > 0) { - /* bigger than a full microsec */ + if(set.tv_usec > 1000000) { set.tv_sec++; set.tv_usec -= 1000000; } |