linux_inet_diag: fix Wshorten-64-to-32 warnings
commit3bd881bfcda950e8d5a06cfef0847e6f46327182
authorEric Wong <e@80x24.org>
Wed, 14 Jan 2015 01:39:38 +0000 (14 01:39 +0000)
committerEric Wong <e@80x24.org>
Wed, 14 Jan 2015 02:57:24 +0000 (14 02:57 +0000)
treeb9fd9515559053f5b228dfc80d5fa6263ac6b3b5
parentc388c34a38f819969511a598cc0cd1014de3e18c
linux_inet_diag: fix Wshorten-64-to-32 warnings

POSIX and glibc 2.2+ declare the hostlen and servlen
args of getnameinfo(3) to be socklen_t, not size_t,
so favor socklen_t for those calculations.

While we're at it, nlmsg_len is u32, too, so cast it
as such to avoid the warning.

Tested on clang version 3.5-1ubuntu1 on x86-64
ext/raindrops/linux_inet_diag.c