From 350838d1b504bf703d71eeedf04c8e0a36ae9be0 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sun, 2 Jan 2011 19:35:19 +0100 Subject: messages: Fixed cast warnings on Windows. --- src/messages.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/messages.c') 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; -- cgit v1.2.3