diff cli-tcpfwd.c @ 1123:d7b752525b91

buf_getstring and buf_putstring now use non-unsigned char*
author Matt Johnston <matt@ucc.asn.au>
date Thu, 04 Jun 2015 23:08:50 +0800
parents c45d65392c1a
children 2907c658fa76
line wrap: on
line diff
--- a/cli-tcpfwd.c	Thu Jun 04 22:25:28 2015 +0800
+++ b/cli-tcpfwd.c	Thu Jun 04 23:08:50 2015 +0800
@@ -136,9 +136,9 @@
 
 	CHECKCLEARTOWRITE();
 	buf_putbyte(ses.writepayload, SSH_MSG_GLOBAL_REQUEST);
-	buf_putstring(ses.writepayload, (const unsigned char *)"tcpip-forward", 13);
+	buf_putstring(ses.writepayload, "tcpip-forward", 13);
 	buf_putbyte(ses.writepayload, 1); /* want_reply */
-	buf_putstring(ses.writepayload, (const unsigned char *)addr, strlen(addr));
+	buf_putstring(ses.writepayload, addr, strlen(addr));
 	buf_putint(ses.writepayload, port);
 
 	encrypt_packet();
@@ -218,7 +218,7 @@
 	char portstring[NI_MAXSERV];
 	int err = SSH_OPEN_ADMINISTRATIVELY_PROHIBITED;
 
-	origaddr = (char *)buf_getstring(ses.payload, NULL);
+	origaddr = buf_getstring(ses.payload, NULL);
 	origport = buf_getint(ses.payload);
 
 	/* Find which port corresponds. First try and match address as well as port,