]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
lint fixes and tcp seems to work again. The magic of it all overwhelmes(?) me
authorMiek Gieben <miekg@NLnetLabs.nl>
Thu, 11 Aug 2005 10:13:18 +0000 (10:13 +0000)
committerMiek Gieben <miekg@NLnetLabs.nl>
Thu, 11 Aug 2005 10:13:18 +0000 (10:13 +0000)
net.c

diff --git a/net.c b/net.c
index 933d534fadfb3a6e87eb7f88462121eab2b07946..f8fd59ff67cb7caa37a4883d7f0d2740dae5f685 100644 (file)
--- a/net.c
+++ b/net.c
@@ -115,10 +115,11 @@ ldns_send(ldns_pkt **result, ldns_resolver *r, ldns_pkt *query_pkt)
                gettimeofday(&tv_s, NULL);
                /* query */
                if (1 == ldns_resolver_usevc(r)) {
-                       ldns_send_tcp(&reply_bytes, qb, ns, ns_len, ldns_resolver_timeout(r), &reply_size);
+                       /* do err handling here ? */
+                       (void)ldns_send_tcp(&reply_bytes, qb, ns, ns_len, ldns_resolver_timeout(r), &reply_size);
                } else {
                        /* udp here, please */
-                       (void) ldns_send_udp(&reply_bytes, qb, ns, ns_len, ldns_resolver_timeout(r), &reply_size);
+                       (void)ldns_send_udp(&reply_bytes, qb, ns, ns_len, ldns_resolver_timeout(r), &reply_size);
                }
                
                /* obey the fail directive */
@@ -240,7 +241,7 @@ ldns_udp_server_connect(const struct sockaddr_storage *to, struct timeval timeou
                return 0;
         }
 
-       if (bind(sockfd, (struct sockaddr*)to, sizeof(*to)) == -1) {
+       if (bind(sockfd, (struct sockaddr*)to, (socklen_t)sizeof(*to)) == -1) {
                perror("bind");
                close(sockfd);
        }
@@ -257,7 +258,7 @@ ldns_udp_connect(const struct sockaddr_storage *to, struct timeval timeout)
                 return 0;
         }
        if (setsockopt(sockfd, SOL_SOCKET, SO_RCVTIMEO, &timeout,
-                               (socklen_t) sizeof(timeout))) {
+                               (socklen_t)sizeof(timeout))) {
                perror("setsockopt");
                close(sockfd);
                return 0;