Mercurial > dropbear
comparison cli-session.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 | 8e0280986710 94ff5316980f |
children | d7b752525b91 |
comparison
equal
deleted
inserted
replaced
1087:1e486f368ec3 | 1121:bb3a03feb31f |
---|---|
192 TRACE(("enter send_msg_service_request: servicename='%s'", servicename)) | 192 TRACE(("enter send_msg_service_request: servicename='%s'", servicename)) |
193 | 193 |
194 CHECKCLEARTOWRITE(); | 194 CHECKCLEARTOWRITE(); |
195 | 195 |
196 buf_putbyte(ses.writepayload, SSH_MSG_SERVICE_REQUEST); | 196 buf_putbyte(ses.writepayload, SSH_MSG_SERVICE_REQUEST); |
197 buf_putstring(ses.writepayload, servicename, strlen(servicename)); | 197 buf_putstring(ses.writepayload, (const unsigned char *)servicename, strlen(servicename)); |
198 | 198 |
199 encrypt_packet(); | 199 encrypt_packet(); |
200 TRACE(("leave send_msg_service_request")) | 200 TRACE(("leave send_msg_service_request")) |
201 } | 201 } |
202 | 202 |
372 } | 372 } |
373 | 373 |
374 /* Operates in-place turning dirty (untrusted potentially containing control | 374 /* Operates in-place turning dirty (untrusted potentially containing control |
375 * characters) text into clean text. | 375 * characters) text into clean text. |
376 * Note: this is safe only with ascii - other charsets could have problems. */ | 376 * Note: this is safe only with ascii - other charsets could have problems. */ |
377 void cleantext(unsigned char* dirtytext) { | 377 void cleantext(char* dirtytext) { |
378 | 378 |
379 unsigned int i, j; | 379 unsigned int i, j; |
380 unsigned char c; | 380 char c; |
381 | 381 |
382 j = 0; | 382 j = 0; |
383 for (i = 0; dirtytext[i] != '\0'; i++) { | 383 for (i = 0; dirtytext[i] != '\0'; i++) { |
384 | 384 |
385 c = dirtytext[i]; | 385 c = dirtytext[i]; |