mirror of
https://github.com/curl/curl.git
synced 2026-08-24 13:03:35 +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
|
|
@ -160,7 +160,7 @@ size_t Curl_base64_encode(struct SessionHandle *data,
|
|||
if(0 == insize)
|
||||
insize = strlen(indata);
|
||||
|
||||
base64data = output = (char*)malloc(insize*4/3+4);
|
||||
base64data = output = malloc(insize*4/3+4);
|
||||
if(NULL == output)
|
||||
return 0;
|
||||
|
||||
|
|
@ -171,7 +171,7 @@ size_t Curl_base64_encode(struct SessionHandle *data,
|
|||
* so we copy it to a buffer, translate it, and use that instead.
|
||||
*/
|
||||
if(data) {
|
||||
convbuf = (char*)malloc(insize);
|
||||
convbuf = malloc(insize);
|
||||
if(!convbuf) {
|
||||
free(output);
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue