]> git.sur5r.net Git - openldap/commitdiff
ITS#5436: make htons() port number unsigned
authorHallvard Furuseth <hallvard@openldap.org>
Tue, 18 Mar 2008 21:12:00 +0000 (21:12 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Tue, 18 Mar 2008 21:12:00 +0000 (21:12 +0000)
libraries/libldap/os-ip.c

index cb8542ab599b712943135717b669769338b5a494..e8545354323e74dc5ae2fa5b9d5e2e966835d049 100644 (file)
@@ -575,7 +575,7 @@ ldap_connect_to_host(LDAP *ld, Sockbuf *sb,
 
                (void)memset((char *)&sin, '\0', sizeof sin);
                sin.sin_family = AF_INET;
-               sin.sin_port = htons((short) port);
+               sin.sin_port = htons((unsigned short) port);
 
                if( use_hp ) {
                        AC_MEMCPY( &sin.sin_addr, hp->h_addr_list[i],