comparison common-channel.c @ 1094:c45d65392c1a

Fix pointer differ in signess warnings [-Werror=pointer-sign]
author Gaël PORTAY <gael.portay@gmail.com>
date Sat, 02 May 2015 15:59:06 +0200
parents acf444bcb115
children 93e29b0ef8dc
comparison
equal deleted inserted replaced
1093:aae71c5f7d5b 1094:c45d65392c1a
919 } 919 }
920 920
921 /* Handle a new channel request, performing any channel-type-specific setup */ 921 /* Handle a new channel request, performing any channel-type-specific setup */
922 void recv_msg_channel_open() { 922 void recv_msg_channel_open() {
923 923
924 unsigned char *type; 924 char *type;
925 unsigned int typelen; 925 unsigned int typelen;
926 unsigned int remotechan, transwindow, transmaxpacket; 926 unsigned int remotechan, transwindow, transmaxpacket;
927 struct Channel *channel; 927 struct Channel *channel;
928 const struct ChanType **cp; 928 const struct ChanType **cp;
929 const struct ChanType *chantype; 929 const struct ChanType *chantype;
932 932
933 933
934 TRACE(("enter recv_msg_channel_open")) 934 TRACE(("enter recv_msg_channel_open"))
935 935
936 /* get the packet contents */ 936 /* get the packet contents */
937 type = buf_getstring(ses.payload, &typelen); 937 type = (char *) buf_getstring(ses.payload, &typelen);
938 938
939 remotechan = buf_getint(ses.payload); 939 remotechan = buf_getint(ses.payload);
940 transwindow = buf_getint(ses.payload); 940 transwindow = buf_getint(ses.payload);
941 transwindow = MIN(transwindow, TRANS_MAX_WINDOW); 941 transwindow = MIN(transwindow, TRANS_MAX_WINDOW);
942 transmaxpacket = buf_getint(ses.payload); 942 transmaxpacket = buf_getint(ses.payload);
1147 1147
1148 /* now open the channel connection */ 1148 /* now open the channel connection */
1149 CHECKCLEARTOWRITE(); 1149 CHECKCLEARTOWRITE();
1150 1150
1151 buf_putbyte(ses.writepayload, SSH_MSG_CHANNEL_OPEN); 1151 buf_putbyte(ses.writepayload, SSH_MSG_CHANNEL_OPEN);
1152 buf_putstring(ses.writepayload, type->name, strlen(type->name)); 1152 buf_putstring(ses.writepayload, (const unsigned char *) type->name, strlen(type->name));
1153 buf_putint(ses.writepayload, chan->index); 1153 buf_putint(ses.writepayload, chan->index);
1154 buf_putint(ses.writepayload, opts.recv_window); 1154 buf_putint(ses.writepayload, opts.recv_window);
1155 buf_putint(ses.writepayload, RECV_MAX_CHANNEL_DATA_LEN); 1155 buf_putint(ses.writepayload, RECV_MAX_CHANNEL_DATA_LEN);
1156 1156
1157 TRACE(("leave send_msg_channel_open_init()")) 1157 TRACE(("leave send_msg_channel_open_init()"))