1
0
mirror of https://github.com/osmarks/ngircd.git synced 2025-10-09 03:42:25 +00:00

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"
This commit is contained in:
Alexander Barton
2009-09-11 22:52:12 +02:00
parent bfa48f3448
commit 8fd0e29d46
10 changed files with 37 additions and 29 deletions

View File

@@ -151,7 +151,8 @@ ng_ipaddr_tostr_r(const ng_ipaddr_t *addr, char *str)
if (*str == ':') {
char tmp[NG_INET_ADDRSTRLEN] = "0";
ret = getnameinfo(sa, ng_ipaddr_salen(addr),
tmp+1, sizeof(tmp) -1, NULL, 0, NI_NUMERICHOST);
tmp + 1, (socklen_t)sizeof(tmp) - 1,
NULL, 0, NI_NUMERICHOST);
if (ret == 0)
strlcpy(str, tmp, NG_INET_ADDRSTRLEN);
}