From 5e887908b34b804a19b2b7370b0aa358d0e55973 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Fri, 30 Apr 2010 16:06:03 +0000 Subject: Consolidate several 'myrealloc' functions into ns_realloc, rename one which *is* different, thereby eliminating the word 'myrealloc' from the NS codebase svn path=/trunk/netsurf/; revision=10530 --- render/html.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'render/html.c') diff --git a/render/html.c b/render/html.c index caada3c96..c818d6e36 100644 --- a/render/html.c +++ b/render/html.c @@ -96,24 +96,6 @@ static const char empty_document[] = "" ""; -/** - * Allocator - * - * \param ptr Pointer to reallocate, or NULL for new allocation - * \param size Number of bytes requires - * \param pw Allocation context - * \return Pointer to allocated block, or NULL on failure - */ -static void *myrealloc(void *ptr, size_t len, void *pw) -{ - if (len == 0) { - free(ptr); - return NULL; - } - - return realloc(ptr, len); -} - /** * Create a CONTENT_HTML. * @@ -484,7 +466,7 @@ void html_finish_conversion(struct content *c) } /* Create selection context */ - error = css_select_ctx_create(myrealloc, c, &c->data.html.select_ctx); + error = css_select_ctx_create(ns_realloc, c, &c->data.html.select_ctx); if (error != CSS_OK) { msg_data.error = messages_get("NoMemory"); content_broadcast(c, CONTENT_MSG_ERROR, msg_data); -- cgit v1.2.3