]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
splint, I hate you
authorWillem Toorop <willem@NLnetLabs.nl>
Fri, 22 Mar 2013 14:00:46 +0000 (14:00 +0000)
committerWillem Toorop <willem@NLnetLabs.nl>
Fri, 22 Mar 2013 14:00:46 +0000 (14:00 +0000)
examples/ldns-dane.c

index ee14fae6ac0eb60b52342d2074952d18bb863797..cb7fee94ce65588a5f239a030ed03ac0eec92a1f 100644 (file)
@@ -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':