Commit 4754765c authored by Mark Andrews's avatar Mark Andrews
Browse files

Fully declare function pointers.

parent 8a21ac0f
......@@ -123,13 +123,14 @@ static unsigned long mem_hash(MEM *a)
return(ret);
}
static void *(*malloc_locked_func)()=(void *(*)())malloc;
static void (*free_locked_func)()=(void (*)())free;
static void *(*malloc_func)()= (void *(*)())malloc;
static void *(*realloc_func)()= (void *(*)())realloc;
static void (*free_func)()= (void (*)())free;
void CRYPTO_set_mem_functions(void *(*m)(), void *(*r)(), void (*f)())
static void *(*malloc_locked_func)(int)=(void *(*)(int))malloc;
static void (*free_locked_func)(void *)=(void (*)(void *))free;
static void *(*malloc_func)(int)= (void *(*)(int))malloc;
static void *(*realloc_func)(void *, int)= (void *(*)(void *, int))realloc;
static void (*free_func)(void *)= (void (*)(void *))free;
void CRYPTO_set_mem_functions(void *(*m)(int), void *(*r)(void *, int),
void (*f)(void *))
{
if ((m == NULL) || (r == NULL) || (f == NULL)) return;
malloc_func=m;
......@@ -139,14 +140,15 @@ void CRYPTO_set_mem_functions(void *(*m)(), void *(*r)(), void (*f)())
free_locked_func=f;
}
void CRYPTO_set_locked_mem_functions(void *(*m)(), void (*f)())
void CRYPTO_set_locked_mem_functions(void *(*m)(int), void (*f)(void *))
{
if ((m == NULL) || (f == NULL)) return;
malloc_locked_func=m;
free_locked_func=f;
}
void CRYPTO_get_mem_functions(void *(**m)(), void *(**r)(), void (**f)())
void CRYPTO_get_mem_functions(void *(**m)(int), void *(**r)(void *, int),
void (**f)(void *))
{
if (m != NULL) *m=malloc_func;
if (r != NULL) *r=realloc_func;
......
......@@ -266,7 +266,7 @@ void sk_zero(STACK *st)
st->num=0;
}
void sk_pop_free(STACK *st, void (*func)())
void sk_pop_free(STACK *st, void (*func)(char *))
{
int i;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment