[libxml2] Remove two references to u_short
- From: Daniel Veillard <veillard src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Remove two references to u_short
- Date: Mon, 2 Apr 2012 09:53:26 +0000 (UTC)
commit ac17e5939c032e547cf5a6325223ff5eb08e04b1
Author: Daniel Veillard <veillard redhat com>
Date: Mon Apr 2 15:45:13 2012 +0800
Remove two references to u_short
nanoftp.c | 3 ++-
nanohttp.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/nanoftp.c b/nanoftp.c
index a7ca5b6..9b32d66 100644
--- a/nanoftp.c
+++ b/nanoftp.c
@@ -947,7 +947,8 @@ xmlNanoFTPConnect(void *ctx) {
((struct sockaddr_in *)&ctxt->ftpAddr)->sin_family = AF_INET;
memcpy (&((struct sockaddr_in *)&ctxt->ftpAddr)->sin_addr,
hp->h_addr_list[0], hp->h_length);
- ((struct sockaddr_in *)&ctxt->ftpAddr)->sin_port = (u_short)htons ((unsigned short)port);
+ ((struct sockaddr_in *)&ctxt->ftpAddr)->sin_port =
+ (unsigned short)htons ((unsigned short)port);
ctxt->controlFd = socket (AF_INET, SOCK_STREAM, 0);
addrlen = sizeof (struct sockaddr_in);
}
diff --git a/nanohttp.c b/nanohttp.c
index a8af0e1..fab024c 100644
--- a/nanohttp.c
+++ b/nanohttp.c
@@ -1166,7 +1166,7 @@ xmlNanoHTTPConnectHost(const char *host, int port)
memcpy (&ia, h->h_addr_list[i], h->h_length);
sockin.sin_family = h->h_addrtype;
sockin.sin_addr = ia;
- sockin.sin_port = (u_short)htons ((unsigned short)port);
+ sockin.sin_port = (unsigned short)htons ((unsigned short)port);
addr = (struct sockaddr *) &sockin;
#ifdef SUPPORT_IP6
} else if (have_ipv6 () && (h->h_addrtype == AF_INET6)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]