summaryrefslogtreecommitdiff
path: root/lib/gnutls_mem.h
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2002-05-23 19:30:29 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2002-05-23 19:30:29 +0000
commit1c4e2e36b7b19afc8bf4396abd1cd088b4b0f046 (patch)
tree2ed98f083303448feaf52aa2141d5b4b876d00c2 /lib/gnutls_mem.h
parent42708e3281eb70d9e46226db66b259d9f644f7ae (diff)
downloadgnutls-1c4e2e36b7b19afc8bf4396abd1cd088b4b0f046.tar.gz
reintroduced realloc_fast() which prevents some malloc(0) situations.gnutls_0_4_3
Diffstat (limited to 'lib/gnutls_mem.h')
-rw-r--r--lib/gnutls_mem.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gnutls_mem.h b/lib/gnutls_mem.h
index aa0ab8e89a..d9cbeb3358 100644
--- a/lib/gnutls_mem.h
+++ b/lib/gnutls_mem.h
@@ -25,6 +25,8 @@ void (*gnutls_free)(void*);
int (*_gnutls_is_secure_memory)(const void*);
void* (*gnutls_realloc)(void*, size_t);
+#define gnutls_realloc_fast(x, y) (y==0?x:realloc(x, y))
+
svoid* gnutls_secure_calloc( size_t nmemb, size_t size);
void* gnutls_calloc( size_t nmemb, size_t size);