summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-01-06 22:17:24 -0500
committerRich Felker <dalias@aerifal.cx>2014-01-06 22:17:24 -0500
commitdbe221ecff2dd8a3d4d005d80b81064e156f8f4a (patch)
tree5665e93e53e9a9c35cf49aa98a3ba2f9ffe30141 /src/network
parenteca335fc0453d3680fd9f112574919e13fab31d2 (diff)
downloadmusl-dbe221ecff2dd8a3d4d005d80b81064e156f8f4a.tar.gz
musl-dbe221ecff2dd8a3d4d005d80b81064e156f8f4a.tar.bz2
musl-dbe221ecff2dd8a3d4d005d80b81064e156f8f4a.tar.xz
musl-dbe221ecff2dd8a3d4d005d80b81064e156f8f4a.zip
fix argument types for legacy function inet_makeaddr
the type int was taken from seemingly erroneous man pages. glibc uses in_addr_t (uint32_t), and semantically, the arguments should be unsigned.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/inet_legacy.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/network/inet_legacy.c b/src/network/inet_legacy.c
index 0a0ad6fc..de5b75c1 100644
--- a/src/network/inet_legacy.c
+++ b/src/network/inet_legacy.c
@@ -16,9 +16,8 @@ int inet_aton(const char *cp, struct in_addr *inp)
return 1;
}
-struct in_addr inet_makeaddr(int net, int host)
+struct in_addr inet_makeaddr(in_addr_t n, in_addr_t h)
{
- uint32_t n = net, h = host;
if (n < 256) h |= n<<24;
else if (n < 65536) h |= n<<16;
else h |= n<<8;