From 18d02264d3ba987607544ebcfb10c61b3feb0385 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Fri, 22 Mar 2013 14:00:46 +0000 Subject: [PATCH] splint, I hate you --- examples/ldns-dane.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/ldns-dane.c b/examples/ldns-dane.c index ee14fae6..cb7fee94 100644 --- a/examples/ldns-dane.c +++ b/examples/ldns-dane.c @@ -248,7 +248,9 @@ connect_with_timeout( return -1; } +#ifndef S_SPLINT_S FD_ZERO(&fdset); +#endif FD_SET(sockfd, &fdset); can_write = select(sockfd + 1, NULL, &fdset, NULL, timeout); @@ -1344,9 +1346,11 @@ main(int argc, char* const* argv) "a numeric value\n"); exit(EXIT_FAILURE); } - timeout.tv_sec = (long) timeout_d; - timeout.tv_usec = (long) +#ifndef S_SPLINT_S + timeout.tv_sec = (int) timeout_d; + timeout.tv_usec = (int) ((timeout_d - timeout.tv_sec) * 1000000); +#endif /* splint */ timeout_p = &timeout; break; case 'u': -- 2.47.3