mirror of
https://frontier.innolan.net/rainlance/c-ares.git
synced 2025-10-05 08:39:45 +00:00
ares_timeout.c: fix compiler warning
This commit is contained in:
@ -62,19 +62,20 @@ struct timeval *ares_timeout(ares_channel channel, struct timeval *maxtv,
|
||||
min_offset = offset;
|
||||
}
|
||||
|
||||
if(min_offset != -1) {
|
||||
nextstop.tv_sec = min_offset/1000;
|
||||
nextstop.tv_usec = (min_offset%1000)*1000;
|
||||
}
|
||||
|
||||
/* If we found a minimum timeout and it's sooner than the one specified in
|
||||
* maxtv (if any), return it. Otherwise go with maxtv.
|
||||
*/
|
||||
if (min_offset != -1 && (!maxtv || ares__timedout(maxtv, &nextstop)))
|
||||
if (min_offset != -1)
|
||||
{
|
||||
*tvbuf = nextstop;
|
||||
return tvbuf;
|
||||
nextstop.tv_sec = min_offset/1000;
|
||||
nextstop.tv_usec = (min_offset%1000)*1000;
|
||||
|
||||
if (!maxtv || ares__timedout(maxtv, &nextstop))
|
||||
{
|
||||
*tvbuf = nextstop;
|
||||
return tvbuf;
|
||||
}
|
||||
}
|
||||
else
|
||||
return maxtv;
|
||||
|
||||
return maxtv;
|
||||
}
|
||||
|
Reference in New Issue
Block a user