diff options
author | Yang Tse <yangsita@gmail.com> | 2010-11-26 19:57:27 +0100 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2010-11-26 19:57:27 +0100 |
commit | 3590874999230e856fe6ab9114b3f4455d984721 (patch) | |
tree | cef63574f3c7ceaa1d475e6a1a5e74b9609a5184 | |
parent | e39ab6f2039210c40a72f5219e7f211a95c9d007 (diff) |
multi: fix compiler warning: conversion may lose significant bits
-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; } |