aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-11-26 19:57:27 +0100
committerYang Tse <yangsita@gmail.com>2010-11-26 19:57:27 +0100
commit3590874999230e856fe6ab9114b3f4455d984721 (patch)
treecef63574f3c7ceaa1d475e6a1a5e74b9609a5184 /lib
parente39ab6f2039210c40a72f5219e7f211a95c9d007 (diff)
multi: fix compiler warning: conversion may lose significant bits
Diffstat (limited to 'lib')
-rw-r--r--lib/multi.c5
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;
}