aboutsummaryrefslogtreecommitdiff
path: root/ares/ares_process.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-07-10 08:21:48 +0000
committerYang Tse <yangsita@gmail.com>2008-07-10 08:21:48 +0000
commite30bbfd85d58cad36bd9b583f528dac0a39f80d5 (patch)
tree9a3464e438f0c92d785e658c59408fe918582c45 /ares/ares_process.c
parent120f9d81b211de9c722eccaa20dc5e993cf1d9a6 (diff)
fix compiler warning
Diffstat (limited to 'ares/ares_process.c')
-rw-r--r--ares/ares_process.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/ares/ares_process.c b/ares/ares_process.c
index 660ad3011..becbfced1 100644
--- a/ares/ares_process.c
+++ b/ares/ares_process.c
@@ -133,13 +133,11 @@ int ares__timeadd(struct timeval *now,
}
/* return time offset between now and (future) check, in milliseconds */
-int ares__timeoffset(struct timeval *now,
- struct timeval *check)
+long ares__timeoffset(struct timeval *now,
+ struct timeval *check)
{
- int secs = (check->tv_sec - now->tv_sec); /* this many seconds */
- int us = (check->tv_usec - now->tv_usec); /* this many microseconds */
-
- return secs*1000 + us/1000; /* return them combined as milliseconds */
+ return (check->tv_sec - now->tv_sec)*1000 +
+ (check->tv_usec - now->tv_usec)/1000;
}