mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-02-14 08:13:12 -05:00
please lint on FreeBSD6
git-svn-id: file:///svn/unbound/trunk@1889 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
586893d761
commit
479bebfff4
4 changed files with 15 additions and 5 deletions
|
|
@ -923,8 +923,10 @@ worker_restart_timer(struct worker* worker)
|
|||
{
|
||||
if(worker->env.cfg->stat_interval > 0) {
|
||||
struct timeval tv;
|
||||
tv.tv_sec = (time_t)worker->env.cfg->stat_interval;
|
||||
#ifndef S_SPLINT_S
|
||||
tv.tv_sec = worker->env.cfg->stat_interval;
|
||||
tv.tv_usec = 0;
|
||||
#endif
|
||||
comm_timer_set(worker->stat_timer, &tv);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -893,8 +893,10 @@ randomize_and_send_udp(struct outside_network* outnet, struct pending* pend,
|
|||
|
||||
/* system calls to set timeout after sending UDP to make roundtrip
|
||||
smaller. */
|
||||
tv.tv_sec = (time_t)(timeout/1000);
|
||||
#ifndef S_SPLINT_S
|
||||
tv.tv_sec = timeout/1000;
|
||||
tv.tv_usec = (timeout%1000)*1000;
|
||||
#endif
|
||||
comm_timer_set(pend->timer, &tv);
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -1010,8 +1012,10 @@ pending_tcp_query(struct outside_network* outnet, ldns_buffer* packet,
|
|||
w->outnet = outnet;
|
||||
w->cb = callback;
|
||||
w->cb_arg = callback_arg;
|
||||
tv.tv_sec = (time_t)timeout;
|
||||
#ifndef S_SPLINT_S
|
||||
tv.tv_sec = timeout;
|
||||
tv.tv_usec = 0;
|
||||
#endif
|
||||
comm_timer_set(w->timer, &tv);
|
||||
if(pend) {
|
||||
/* we have a buffer available right now */
|
||||
|
|
|
|||
|
|
@ -991,8 +991,10 @@ service(const char* bind_str, int bindport, const char* serv_str,
|
|||
struct timeval delay, reuse;
|
||||
ldns_buffer* pkt;
|
||||
int i, s, listen_s;
|
||||
delay.tv_sec = (time_t)(delay_msec / 1000);
|
||||
#ifndef S_SPLINT_S
|
||||
delay.tv_sec = delay_msec / 1000;
|
||||
delay.tv_usec = (delay_msec % 1000)*1000;
|
||||
#endif
|
||||
reuse = delay; /* reuse is max(4*delay, 1 second) */
|
||||
dl_tv_add(&reuse, &delay);
|
||||
dl_tv_add(&reuse, &delay);
|
||||
|
|
|
|||
|
|
@ -469,8 +469,10 @@ time_passes(struct replay_runtime* runtime, struct replay_moment* mom)
|
|||
verbose(VERB_ALGO, "EVAL %s", mom->string);
|
||||
sec = atof(xp);
|
||||
free(xp);
|
||||
tv.tv_sec = (time_t)sec;
|
||||
#ifndef S_SPLINT_S
|
||||
tv.tv_sec = sec;
|
||||
tv.tv_usec = (int)((sec - (double)tv.tv_sec) *1000000. + 0.5);
|
||||
#endif
|
||||
}
|
||||
timeval_add(&runtime->now_tv, &tv);
|
||||
runtime->now_secs = (uint32_t)runtime->now_tv.tv_sec;
|
||||
|
|
|
|||
Loading…
Reference in a new issue