mirror of
https://github.com/moparisthebest/curl
synced 2024-11-16 06:25:03 -05:00
Curl_fileinfo_dup: removed, not used
This commit is contained in:
parent
a6f14e17b7
commit
c2eb8c932d
@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 2010-2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@ -55,21 +55,3 @@ void Curl_fileinfo_dtor(void *user, void *element)
|
|||||||
|
|
||||||
free(finfo);
|
free(finfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct curl_fileinfo *Curl_fileinfo_dup(const struct curl_fileinfo *src)
|
|
||||||
{
|
|
||||||
struct curl_fileinfo *ptr = malloc(sizeof(struct curl_fileinfo));
|
|
||||||
if(!ptr)
|
|
||||||
return NULL;
|
|
||||||
*ptr = *src;
|
|
||||||
|
|
||||||
ptr->b_data = malloc(src->b_size);
|
|
||||||
if(!ptr->b_data) {
|
|
||||||
free(ptr);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
memcpy(ptr->b_data, src->b_data, src->b_size);
|
|
||||||
return ptr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user