From b3b6d8f3f91824df11b3f1e61c8ad443c8c65458 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 18 Oct 2008 15:00:18 +0200 Subject: Fix const, dupes. --- source3/lib/util.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) (limited to 'source3/lib/util.c') diff --git a/source3/lib/util.c b/source3/lib/util.c index 2f1dd83bb1..92b818b0aa 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -1072,26 +1072,6 @@ static void *realloc_(void *ptr, size_t size) #endif /* PARANOID_MALLOC_CHECKER */ -/**************************************************************************** - Type-safe malloc. -****************************************************************************/ - -void *malloc_array(size_t el_size, unsigned int count) -{ - if (count >= MAX_ALLOC_SIZE/el_size) { - return NULL; - } - - if (el_size == 0 || count == 0) { - return NULL; - } -#if defined(PARANOID_MALLOC_CHECKER) - return malloc_(el_size*count); -#else - return malloc(el_size*count); -#endif -} - /**************************************************************************** Type-safe memalign ****************************************************************************/ @@ -1192,21 +1172,6 @@ void *Realloc(void *p, size_t size, bool free_old_on_error) return(ret); } -/**************************************************************************** - Type-safe realloc. -****************************************************************************/ - -void *realloc_array(void *p, size_t el_size, unsigned int count, bool free_old_on_error) -{ - if (count >= MAX_ALLOC_SIZE/el_size) { - if (free_old_on_error) { - SAFE_FREE(p); - } - return NULL; - } - return Realloc(p, el_size*count, free_old_on_error); -} - /**************************************************************************** (Hopefully) efficient array append. ****************************************************************************/ -- cgit