comparison svr-x11fwd.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 d3925ed45a85
children 877256d1b3fb
comparison
equal deleted inserted replaced
1093:aae71c5f7d5b 1094:c45d65392c1a
56 if (chansess->x11listener != NULL) { 56 if (chansess->x11listener != NULL) {
57 return DROPBEAR_FAILURE; 57 return DROPBEAR_FAILURE;
58 } 58 }
59 59
60 chansess->x11singleconn = buf_getbool(ses.payload); 60 chansess->x11singleconn = buf_getbool(ses.payload);
61 chansess->x11authprot = buf_getstring(ses.payload, NULL); 61 chansess->x11authprot = (char *)buf_getstring(ses.payload, NULL);
62 chansess->x11authcookie = buf_getstring(ses.payload, NULL); 62 chansess->x11authcookie = (char *)buf_getstring(ses.payload, NULL);
63 chansess->x11screennum = buf_getint(ses.payload); 63 chansess->x11screennum = buf_getint(ses.payload);
64 64
65 /* create listening socket */ 65 /* create listening socket */
66 fd = socket(PF_INET, SOCK_STREAM, 0); 66 fd = socket(PF_INET, SOCK_STREAM, 0);
67 if (fd < 0) { 67 if (fd < 0) {
201 201
202 char* ipstring = NULL; 202 char* ipstring = NULL;
203 203
204 if (send_msg_channel_open_init(fd, &chan_x11) == DROPBEAR_SUCCESS) { 204 if (send_msg_channel_open_init(fd, &chan_x11) == DROPBEAR_SUCCESS) {
205 ipstring = inet_ntoa(addr->sin_addr); 205 ipstring = inet_ntoa(addr->sin_addr);
206 buf_putstring(ses.writepayload, ipstring, strlen(ipstring)); 206 buf_putstring(ses.writepayload, (const unsigned char *)ipstring, strlen(ipstring));
207 buf_putint(ses.writepayload, addr->sin_port); 207 buf_putint(ses.writepayload, addr->sin_port);
208 208
209 encrypt_packet(); 209 encrypt_packet();
210 return DROPBEAR_SUCCESS; 210 return DROPBEAR_SUCCESS;
211 } else { 211 } else {