From: Bodo Möller Date: Wed, 10 Jan 2001 19:26:34 +0000 (+0000) Subject: No functional change, but slightly improved code clarity. X-Git-Tag: OpenSSL_0_9_6a-beta1~81^2~43 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b93642c5ccf3274e505080768f9ac199b036cc1d;p=oweals%2Fopenssl.git No functional change, but slightly improved code clarity. --- diff --git a/crypto/mem.c b/crypto/mem.c index a4a78807f7..effec714e8 100644 --- a/crypto/mem.c +++ b/crypto/mem.c @@ -198,8 +198,10 @@ int CRYPTO_set_mem_debug_functions(void (*m)(void *,int,const char *,int,int), void CRYPTO_get_mem_functions(void *(**m)(size_t), void *(**r)(void *, size_t), void (**f)(void *)) { - if (m != NULL) *m=malloc_func; - if (r != NULL) *r=realloc_func; + if (m != NULL) *m = (malloc_ex_func == default_malloc_ex) ? + malloc_func : 0; + if (r != NULL) *r = (realloc_ex_func == default_realloc_ex) ? + realloc_func : 0; if (f != NULL) *f=free_func; } @@ -217,7 +219,8 @@ void CRYPTO_get_mem_ex_functions( void CRYPTO_get_locked_mem_functions(void *(**m)(size_t), void (**f)(void *)) { - if (m != NULL) *m=malloc_locked_func; + if (m != NULL) *m = (malloc_locked_ex_func == default_malloc_locked_ex) ? + malloc_locked_func : 0; if (f != NULL) *f=free_locked_func; }