summaryrefslogtreecommitdiff
path: root/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
commit2265b9281c8172709a90ccab4255e74527a24841 (patch)
tree9e9df76dd9f6f91740e2e7c74bd5eb0ed28faf53 /ares_process.c
parent8ee63e432d05f9ecbc107ec567b207ef75b0c1b7 (diff)
downloadc-ares-2265b9281c8172709a90ccab4255e74527a24841.tar.gz
c-ares-2265b9281c8172709a90ccab4255e74527a24841.tar.bz2
c-ares-2265b9281c8172709a90ccab4255e74527a24841.zip
fix compiler warning
Diffstat (limited to 'ares_process.c')
-rw-r--r--ares_process.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/ares_process.c b/ares_process.c
index 660ad30..becbfce 100644
--- a/ares_process.c
+++ b/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;
}