summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJorge Arellano Cid <jcid@dillo.org>2009-07-16 20:35:56 -0400
committerJorge Arellano Cid <jcid@dillo.org>2009-07-16 20:35:56 -0400
commitc5440a6b044de78bee086d2527cd067ea99f546b (patch)
treeb1c0bae9d80044c902614c7e4b275298d55cfb39 /src
parent515cd053baecf09a50ba4dabf6c422425d9eccbc (diff)
Minor cleanups
Diffstat (limited to 'src')
-rw-r--r--src/dillo.cc4
-rw-r--r--src/dns.c5
-rw-r--r--src/dns.h6
3 files changed, 8 insertions, 7 deletions
diff --git a/src/dillo.cc b/src/dillo.cc
index 3e663a4d..45a98de6 100644
--- a/src/dillo.cc
+++ b/src/dillo.cc
@@ -205,8 +205,8 @@ static DilloUrl *makeStartUrl(char *str, bool local)
*/
int main(int argc, char **argv)
{
- uint opt_id;
- uint options_got = 0;
+ uint_t opt_id;
+ uint_t options_got = 0;
uint32_t xid = 0;
int idx = 1;
int xpos = PREFS_GEOMETRY_DEFAULT_XPOS, ypos = PREFS_GEOMETRY_DEFAULT_YPOS,
diff --git a/src/dns.c b/src/dns.c
index cc17b0cd..2cee0e85 100644
--- a/src/dns.c
+++ b/src/dns.c
@@ -87,7 +87,6 @@ static GDnsCache *dns_cache;
static int dns_cache_size, dns_cache_size_max;
static GDnsQueue *dns_queue;
static int dns_queue_size, dns_queue_size_max;
-static bool_t ipv6_enabled;
/* ----------------------------------------------------------------------
@@ -200,16 +199,14 @@ void a_Dns_init(void)
#endif
}
- /* IPv6 test */
- ipv6_enabled = FALSE;
#ifdef ENABLE_IPV6
+ /* IPv6 test */
{
/* 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);
- ipv6_enabled = TRUE;
}
}
#endif
diff --git a/src/dns.h b/src/dns.h
index fca28727..78f8cf18 100644
--- a/src/dns.h
+++ b/src/dns.h
@@ -14,7 +14,11 @@ void a_Dns_init (void);
void a_Dns_freeall(void);
void a_Dns_resolve(const char *hostname, DnsCallback_t cb_func, void *cb_data);
-#define DILLO_ADDR_MAX sizeof(struct in6_addr)
+#ifdef ENABLE_IPV6
+# define DILLO_ADDR_MAX sizeof(struct in6_addr)
+#else
+# define DILLO_ADDR_MAX sizeof(struct in_addr)
+#endif
typedef struct _DilloHost
{