diff options
author | Yang Tse <yangsita@gmail.com> | 2010-12-01 23:36:19 +0100 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2010-12-01 23:36:19 +0100 |
commit | 41b8a1bfd077ed0035d6bea42c70b1156b919dd5 (patch) | |
tree | 9589d46b95470a3e517cefca689a0e3dc149d385 /ares_init.c | |
parent | e3f7230dc27db056830320214b611a07e19e939b (diff) | |
download | c-ares-41b8a1bfd077ed0035d6bea42c70b1156b919dd5.tar.gz c-ares-41b8a1bfd077ed0035d6bea42c70b1156b919dd5.tar.bz2 c-ares-41b8a1bfd077ed0035d6bea42c70b1156b919dd5.zip |
fix compiler warning: conversion may lose significant bits
Diffstat (limited to 'ares_init.c')
-rw-r--r-- | ares_init.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ares_init.c b/ares_init.c index eb1719a..3351bcf 100644 --- a/ares_init.c +++ b/ares_init.c @@ -67,6 +67,7 @@ #include "ares.h" #include "inet_net_pton.h" #include "ares_library_init.h" +#include "ares_nowarn.h" #include "ares_private.h" #ifdef ANDROID @@ -1400,13 +1401,13 @@ static int set_options(ares_channel channel, const char *str) q++; val = try_option(p, q, "ndots:"); if (val && channel->ndots == -1) - channel->ndots = (int)strtol(val, NULL, 10); + channel->ndots = aresx_sltosi(strtol(val, NULL, 10)); val = try_option(p, q, "retrans:"); if (val && channel->timeout == -1) - channel->timeout = (int)strtol(val, NULL, 10); + channel->timeout = aresx_sltosi(strtol(val, NULL, 10)); val = try_option(p, q, "retry:"); if (val && channel->tries == -1) - channel->tries = (int)strtol(val, NULL, 10); + channel->tries = aresx_sltosi(strtol(val, NULL, 10)); val = try_option(p, q, "rotate"); if (val && channel->rotate == -1) channel->rotate = 1; |