aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cynapses.org>2011-01-02 19:35:19 +0100
committerAndreas Schneider <asn@cynapses.org>2011-01-02 19:35:54 +0100
commit350838d1b504bf703d71eeedf04c8e0a36ae9be0 (patch)
tree74b8a13b1ecfe2d3da7fce4ecec3183e723da125
parentf23880ddee20cd2327d3e4b09f8b09d9880db1a8 (diff)
downloadlibssh-350838d1b504bf703d71eeedf04c8e0a36ae9be0.tar.gz
libssh-350838d1b504bf703d71eeedf04c8e0a36ae9be0.tar.xz
libssh-350838d1b504bf703d71eeedf04c8e0a36ae9be0.zip
messages: Fixed cast warnings on Windows.
-rw-r--r--src/messages.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/messages.c b/src/messages.c
index 1f81407b..cee97637 100644
--- a/src/messages.c
+++ b/src/messages.c
@@ -494,7 +494,7 @@ SSH_PACKET_CALLBACK(ssh_packet_channel_open){
ssh_string_free(destination);
buffer_get_u32(packet, &destination_port);
- msg->channel_request_open.destination_port = ntohl(destination_port);
+ msg->channel_request_open.destination_port = (uint16_t) ntohl(destination_port);
originator = buffer_get_ssh_string(packet);
if (originator == NULL) {
@@ -510,7 +510,7 @@ SSH_PACKET_CALLBACK(ssh_packet_channel_open){
ssh_string_free(originator);
buffer_get_u32(packet, &originator_port);
- msg->channel_request_open.originator_port = ntohl(originator_port);
+ msg->channel_request_open.originator_port = (uint16_t) ntohl(originator_port);
msg->channel_request_open.type = SSH_CHANNEL_DIRECT_TCPIP;
goto end;
@@ -531,7 +531,7 @@ SSH_PACKET_CALLBACK(ssh_packet_channel_open){
ssh_string_free(destination);
buffer_get_u32(packet, &destination_port);
- msg->channel_request_open.destination_port = ntohl(destination_port);
+ msg->channel_request_open.destination_port = (uint16_t) ntohl(destination_port);
originator = buffer_get_ssh_string(packet);
if (originator == NULL) {
@@ -547,7 +547,7 @@ SSH_PACKET_CALLBACK(ssh_packet_channel_open){
ssh_string_free(originator);
buffer_get_u32(packet, &originator_port);
- msg->channel_request_open.originator_port = ntohl(originator_port);
+ msg->channel_request_open.originator_port = (uint16_t) ntohl(originator_port);
msg->channel_request_open.type = SSH_CHANNEL_FORWARDED_TCPIP;
goto end;
@@ -568,7 +568,7 @@ SSH_PACKET_CALLBACK(ssh_packet_channel_open){
ssh_string_free(originator);
buffer_get_u32(packet, &originator_port);
- msg->channel_request_open.originator_port = ntohl(originator_port);
+ msg->channel_request_open.originator_port = (uint16_t) ntohl(originator_port);
msg->channel_request_open.type = SSH_CHANNEL_X11;
goto end;