Mercurial > dropbear
diff svr-tcpfwd.c @ 1121:bb3a03feb31f
Merge pull request #13 from gazoo74/fix-warnings
Fix warnings
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 04 Jun 2015 22:25:28 +0800 |
parents | db7963049308 |
children | aaf576b27a10 |
line wrap: on
line diff
--- a/svr-tcpfwd.c Wed Jun 03 22:59:59 2015 +0800 +++ b/svr-tcpfwd.c Thu Jun 04 22:25:28 2015 +0800 @@ -65,7 +65,7 @@ * similar to the request-switching in chansession.c */ void recv_msg_global_request_remotetcp() { - unsigned char* reqname = NULL; + char* reqname = NULL; unsigned int namelen; unsigned int wantreply = 0; int ret = DROPBEAR_FAILURE; @@ -77,7 +77,7 @@ goto out; } - reqname = buf_getstring(ses.payload, &namelen); + reqname = (char *)buf_getstring(ses.payload, &namelen); wantreply = buf_getbool(ses.payload); if (namelen > MAX_NAME_LEN) { @@ -120,7 +120,7 @@ static int svr_cancelremotetcp() { int ret = DROPBEAR_FAILURE; - unsigned char * bindaddr = NULL; + char * bindaddr = NULL; unsigned int addrlen; unsigned int port; struct Listener * listener = NULL; @@ -128,7 +128,7 @@ TRACE(("enter cancelremotetcp")) - bindaddr = buf_getstring(ses.payload, &addrlen); + bindaddr = (char *)buf_getstring(ses.payload, &addrlen); if (addrlen > MAX_IP_LEN) { TRACE(("addr len too long: %d", addrlen)) goto out; @@ -155,14 +155,14 @@ static int svr_remotetcpreq() { int ret = DROPBEAR_FAILURE; - unsigned char * request_addr = NULL; + char * request_addr = NULL; unsigned int addrlen; struct TCPListener *tcpinfo = NULL; unsigned int port; TRACE(("enter remotetcpreq")) - request_addr = buf_getstring(ses.payload, &addrlen); + request_addr = (char *)buf_getstring(ses.payload, &addrlen); if (addrlen > MAX_IP_LEN) { TRACE(("addr len too long: %d", addrlen)) goto out; @@ -232,12 +232,12 @@ * address */ static int newtcpdirect(struct Channel * channel) { - unsigned char* desthost = NULL; + char* desthost = NULL; unsigned int destport; - unsigned char* orighost = NULL; + char* orighost = NULL; unsigned int origport; char portstring[NI_MAXSERV]; - int len; + unsigned int len; int err = SSH_OPEN_ADMINISTRATIVELY_PROHIBITED; TRACE(("newtcpdirect channel %d", channel->index)) @@ -247,7 +247,7 @@ goto out; } - desthost = buf_getstring(ses.payload, &len); + desthost = (char *)buf_getstring(ses.payload, &len); if (len > MAX_HOST_LEN) { TRACE(("leave newtcpdirect: desthost too long")) goto out; @@ -255,7 +255,7 @@ destport = buf_getint(ses.payload); - orighost = buf_getstring(ses.payload, &len); + orighost = (char *)buf_getstring(ses.payload, &len); if (len > MAX_HOST_LEN) { TRACE(("leave newtcpdirect: orighost too long")) goto out;