mirror of
https://github.com/curl/curl.git
synced 2026-08-25 01:33:31 +03:00
remove unnecessary typecasting of malloc()
This commit is contained in:
parent
a622fd90b4
commit
59e378f48f
31 changed files with 68 additions and 72 deletions
|
|
@ -550,7 +550,7 @@ static CURLcode ftp_readresp(curl_socket_t sockfd,
|
|||
|
||||
if(clipamount) {
|
||||
ftpc->cache_size = clipamount;
|
||||
ftpc->cache = (char *)malloc((int)ftpc->cache_size);
|
||||
ftpc->cache = malloc((int)ftpc->cache_size);
|
||||
if(ftpc->cache)
|
||||
memcpy(ftpc->cache, ftpc->linestart_resp, (int)ftpc->cache_size);
|
||||
else
|
||||
|
|
@ -2751,7 +2751,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
|
|||
|
||||
case FTP_PWD:
|
||||
if(ftpcode == 257) {
|
||||
char *dir = (char *)malloc(nread+1);
|
||||
char *dir = malloc(nread+1);
|
||||
char *store=dir;
|
||||
char *ptr=&data->state.buffer[4]; /* start on the first letter */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue