提交 332dc4fa 编写于 作者: R Rich Salz

sh_malloc & sh_free prototype change to match POSIX

CLA: trivial
Reviewed-by: NAndy Polyakov <appro@openssl.org>
Reviewed-by: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2823)
上级 42f50fdf
......@@ -52,8 +52,8 @@ static CRYPTO_RWLOCK *sec_malloc_lock = NULL;
* These are the functions that must be implemented by a secure heap (sh).
*/
static int sh_init(size_t size, int minsize);
static char *sh_malloc(size_t size);
static void sh_free(char *ptr);
static void *sh_malloc(size_t size);
static void sh_free(void *ptr);
static void sh_done(void);
static size_t sh_actual_size(char *ptr);
static int sh_allocated(const char *ptr);
......@@ -476,7 +476,7 @@ static char *sh_find_my_buddy(char *ptr, int list)
return chunk;
}
static char *sh_malloc(size_t size)
static void *sh_malloc(size_t size)
{
ossl_ssize_t list, slist;
size_t i;
......@@ -535,10 +535,10 @@ static char *sh_malloc(size_t size)
return chunk;
}
static void sh_free(char *ptr)
static void sh_free(void *ptr)
{
size_t list;
char *buddy;
void *buddy;
if (ptr == NULL)
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册