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 --- gtk/gtk_gui.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'gtk/gtk_gui.c') diff --git a/gtk/gtk_gui.c b/gtk/gtk_gui.c index 9a0eca10a..eec28a20a 100644 --- a/gtk/gtk_gui.c +++ b/gtk/gtk_gui.c @@ -98,7 +98,6 @@ static struct form_control *select_menu_control; static void nsgtk_init_glade(void); static void nsgtk_check_homedir(void); -static void *nsgtk_hubbub_realloc(void *ptr, size_t len, void *pw); static bool nsgtk_throbber_init(int framec); static void nsgtk_ssl_accept(GtkButton *w, gpointer data); static void nsgtk_ssl_reject(GtkButton *w, gpointer data); @@ -199,7 +198,7 @@ static void gui_init(int argc, char** argv) nsgtk_find_resource(buf, "Aliases", "./gtk/res/Aliases"); LOG(("Using '%s' as Aliases file", buf)); - if (hubbub_initialise(buf, nsgtk_hubbub_realloc, NULL) != HUBBUB_OK) + if (hubbub_initialise(buf, ns_realloc, NULL) != HUBBUB_OK) die("Unable to initialise HTML parsing library.\n"); nsgtk_find_resource(buf, "netsurf.xpm", "./gtk/res/netsurf.xpm"); @@ -501,7 +500,7 @@ void gui_quit(void) free(toolbar_indices_file_location); gtk_fetch_filetype_fin(); /* We don't care if this fails as we're about to die, anyway */ - hubbub_finalise(nsgtk_hubbub_realloc, NULL); + hubbub_finalise(ns_realloc, NULL); } @@ -533,19 +532,6 @@ void nsgtk_check_homedir(void) } -/** - * Allocator callback function for hubbub. - */ -void *nsgtk_hubbub_realloc(void *ptr, size_t len, void *pw) -{ - if (len == 0) { - free(ptr); - return NULL; - } - - return realloc(ptr, len); -} - /* This is an ugly hack to just get the new-style throbber going. * It, along with the PNG throbber loader, need making more generic. -- cgit v1.2.3