From 3590874999230e856fe6ab9114b3f4455d984721 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Fri, 26 Nov 2010 19:57:27 +0100 Subject: multi: fix compiler warning: conversion may lose significant bits --- lib/multi.c | 5 +---- 1 file changed, 1 insertion(+), 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; } -- cgit v1.2.3