From: Hallvard Furuseth Date: Tue, 18 Mar 2008 21:12:00 +0000 (+0000) Subject: ITS#5436: make htons() port number unsigned X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~78 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c55a06254f659ae614fa1e38ab0337497151b288;p=openldap ITS#5436: make htons() port number unsigned --- diff --git a/libraries/libldap/os-ip.c b/libraries/libldap/os-ip.c index cb8542ab59..e854535432 100644 --- a/libraries/libldap/os-ip.c +++ b/libraries/libldap/os-ip.c @@ -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],