mirror of
https://github.com/curl/curl.git
synced 2026-08-24 16:23:34 +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
|
|
@ -711,7 +711,7 @@ struct CookieInfo *Curl_cookie_init(struct SessionHandle *data,
|
|||
char *lineptr;
|
||||
bool headerline;
|
||||
|
||||
char *line = (char *)malloc(MAX_COOKIE_LINE);
|
||||
char *line = malloc(MAX_COOKIE_LINE);
|
||||
if(line) {
|
||||
while(fgets(line, MAX_COOKIE_LINE, fp)) {
|
||||
if(checkprefix("Set-Cookie:", line)) {
|
||||
|
|
@ -789,7 +789,7 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c,
|
|||
/* and now, we know this is a match and we should create an
|
||||
entry for the return-linked-list */
|
||||
|
||||
newco = (struct Cookie *)malloc(sizeof(struct Cookie));
|
||||
newco = malloc(sizeof(struct Cookie));
|
||||
if(newco) {
|
||||
/* first, copy the whole source cookie: */
|
||||
memcpy(newco, co, sizeof(struct Cookie));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue