mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
Removed some redundant type casts
This commit is contained in:
parent
934708d950
commit
0994d7811f
@ -117,7 +117,7 @@ size_t Curl_base64_decode(const char *src, unsigned char **outptr)
|
|||||||
/* Decode all but the last quantum (which may not decode to a
|
/* Decode all but the last quantum (which may not decode to a
|
||||||
multiple of 3 bytes) */
|
multiple of 3 bytes) */
|
||||||
for(i = 0; i < numQuantums - 1; i++) {
|
for(i = 0; i < numQuantums - 1; i++) {
|
||||||
decodeQuantum((unsigned char *)newstr, src);
|
decodeQuantum(newstr, src);
|
||||||
newstr += 3; src += 4;
|
newstr += 3; src += 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,7 +153,7 @@ size_t Curl_base64_encode(struct SessionHandle *data,
|
|||||||
char *convbuf = NULL;
|
char *convbuf = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char *indata = (char *)inp;
|
const char *indata = inp;
|
||||||
|
|
||||||
*outptr = NULL; /* set to NULL in case of failure before we reach the end */
|
*outptr = NULL; /* set to NULL in case of failure before we reach the end */
|
||||||
|
|
||||||
|
@ -619,7 +619,7 @@ Curl_addrinfo *Curl_ip2addr(in_addr_t num, const char *hostname, int port)
|
|||||||
h->h_aliases = NULL;
|
h->h_aliases = NULL;
|
||||||
|
|
||||||
/* Now store the dotted version of the address */
|
/* Now store the dotted version of the address */
|
||||||
snprintf((char *)h->h_name, 16, "%s", hostname);
|
snprintf(h->h_name, 16, "%s", hostname);
|
||||||
|
|
||||||
#if defined(VMS) && \
|
#if defined(VMS) && \
|
||||||
defined(__INITIAL_POINTER_SIZE) && (__INITIAL_POINTER_SIZE == 64)
|
defined(__INITIAL_POINTER_SIZE) && (__INITIAL_POINTER_SIZE == 64)
|
||||||
|
@ -765,7 +765,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn)
|
|||||||
else if(rc > 0) {
|
else if(rc > 0) {
|
||||||
/* It seems that this string is not always NULL terminated */
|
/* It seems that this string is not always NULL terminated */
|
||||||
tempHome[rc] = '\0';
|
tempHome[rc] = '\0';
|
||||||
sshc->homedir = (char *)strdup(tempHome);
|
sshc->homedir = strdup(tempHome);
|
||||||
if(!sshc->homedir) {
|
if(!sshc->homedir) {
|
||||||
state(conn, SSH_SFTP_CLOSE);
|
state(conn, SSH_SFTP_CLOSE);
|
||||||
sshc->actualcode = CURLE_OUT_OF_MEMORY;
|
sshc->actualcode = CURLE_OUT_OF_MEMORY;
|
||||||
|
@ -803,7 +803,7 @@ static CURLcode tftp_do(struct connectdata *conn, bool *done)
|
|||||||
break;
|
break;
|
||||||
case TFTP_EVENT_ERROR:
|
case TFTP_EVENT_ERROR:
|
||||||
state->error = (tftp_error_t)getrpacketblock(&state->rpacket);
|
state->error = (tftp_error_t)getrpacketblock(&state->rpacket);
|
||||||
infof(data, "%s\n", (char *)&state->rpacket.data[4]);
|
infof(data, "%s\n", (const char *)&state->rpacket.data[4]);
|
||||||
break;
|
break;
|
||||||
case TFTP_EVENT_ACK:
|
case TFTP_EVENT_ACK:
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user