about summary refs log tree commit diff
path: root/src/ipaddr/ng_ipaddr.h
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2009-09-11 22:52:12 +0200
committerAlexander Barton <alex@barton.de>2009-09-11 22:52:12 +0200
commit8fd0e29d463c934756dce7a562f09ea831b5d968 (patch)
treecd25067d357cf30a59d6781c818f323c64d92737 /src/ipaddr/ng_ipaddr.h
parentbfa48f3448a140048386810f97049ad8200c1842 (diff)
downloadngircd-8fd0e29d463c934756dce7a562f09ea831b5d968.tar.gz
ngircd-8fd0e29d463c934756dce7a562f09ea831b5d968.zip
Fix "implicit conversion shortens 64-bit value" warning
This patch fixes the following gcc warning in our sources:
"implicit conversion shortens 64-bit value into a 32-bit value"
Diffstat (limited to 'src/ipaddr/ng_ipaddr.h')
-rw-r--r--src/ipaddr/ng_ipaddr.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ipaddr/ng_ipaddr.h b/src/ipaddr/ng_ipaddr.h
index 6490a074..32b1ec0f 100644
--- a/src/ipaddr/ng_ipaddr.h
+++ b/src/ipaddr/ng_ipaddr.h
@@ -58,10 +58,10 @@ ng_ipaddr_salen(const ng_ipaddr_t *a)
 #ifdef WANT_IPV6
 	assert(a->sa.sa_family == AF_INET || a->sa.sa_family == AF_INET6);
 	if (a->sa.sa_family == AF_INET6)
-		return sizeof(a->sin6);
+		return (socklen_t)sizeof(a->sin6);
 #endif
 	assert(a->sin4.sin_family == AF_INET);
-	return sizeof(a->sin4);
+	return (socklen_t)sizeof(a->sin4);
 }
 
 
@@ -115,4 +115,3 @@ ng_ipaddr_tostr_r(const ng_ipaddr_t *addr, char *d)
 #endif
 
 /* -eof- */
-