]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ipaddr/ng_ipaddr.h
ng_ipaddr.h: include assert.h
[ngircd-alex.git] / src / ipaddr / ng_ipaddr.h
index 7894af25fbebefdb22f24adac1afe9a9dcb639b6..4582e2a533eca80c7948d0ca00db3fc5106348d8 100644 (file)
@@ -8,6 +8,7 @@
 #define NG_IPADDR_HDR
 #include "portab.h"
 
+#include <assert.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 
@@ -58,10 +59,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);
 }
 
 
@@ -84,7 +85,6 @@ ng_ipaddr_getport(const ng_ipaddr_t *a)
  * init a ng_ipaddr_t object.
  * @param addr: pointer to ng_ipaddr_t to initialize.
  * @param ip_str: ip address in dotted-decimal (ipv4) or hexadecimal (ipv6) notation
- *                if ip_str is NULL it is treated as 0.0.0.0/[::]
  * @param port: transport layer port number to use.
  */
 GLOBAL bool ng_ipaddr_init PARAMS((ng_ipaddr_t *addr, const char *ip_str, UINT16 port));
@@ -116,4 +116,3 @@ ng_ipaddr_tostr_r(const ng_ipaddr_t *addr, char *d)
 #endif
 
 /* -eof- */
-