summaryrefslogtreecommitdiff
path: root/src/dns.c
diff options
context:
space:
mode:
authorJorge Arellano Cid <jcid@dillo.org>2013-01-09 12:47:23 -0300
committerJorge Arellano Cid <jcid@dillo.org>2013-01-09 12:47:23 -0300
commitcbba835b154ba31e7a07ba1b15a06b8953eb7e72 (patch)
tree8ea8ad0b67ba6a2f8a789f9e61ea4f80d0c20d35 /src/dns.c
parentd236210c1608952b7910123fbede108317a80444 (diff)
Refactored FD close calls into a single new dClose() dlib function [p37sitdu]
Diffstat (limited to 'src/dns.c')
-rw-r--r--src/dns.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/dns.c b/src/dns.c
index 7ae19fe4..e288e8cc 100644
--- a/src/dns.c
+++ b/src/dns.c
@@ -217,9 +217,8 @@ void a_Dns_init(void)
/* If the IPv6 address family is not available there is no point
wasting time trying to connect to v6 addresses. */
int fd = socket(AF_INET6, SOCK_STREAM, 0);
- if (fd >= 0) {
- close(fd);
- }
+ if (fd >= 0)
+ dClose(fd);
}
#endif
}
@@ -510,8 +509,8 @@ void a_Dns_freeall(void)
dList_free(dns_cache[i].addr_list);
}
a_IOwatch_remove_fd(dns_notify_pipe[0], DIO_READ);
- close(dns_notify_pipe[0]);
- close(dns_notify_pipe[1]);
+ dClose(dns_notify_pipe[0]);
+ dClose(dns_notify_pipe[1]);
dFree(dns_cache);
}