diff options
author | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2010-04-30 16:06:03 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2010-04-30 16:06:03 +0000 |
commit | 5e887908b34b804a19b2b7370b0aa358d0e55973 (patch) | |
tree | 68935c8d2fe196a64a17bace1508884d538a5e17 /windows/gui.c | |
parent | f0237aac922a3ee5b14233fa98baf19df97866ed (diff) | |
download | netsurf-5e887908b34b804a19b2b7370b0aa358d0e55973.tar.gz netsurf-5e887908b34b804a19b2b7370b0aa358d0e55973.tar.bz2 |
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
Diffstat (limited to 'windows/gui.c')
-rw-r--r-- | windows/gui.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/windows/gui.c b/windows/gui.c index 187430a3c..7dfa7579c 100644 --- a/windows/gui.c +++ b/windows/gui.c @@ -2282,21 +2282,11 @@ void gui_cert_verify(const char *url, const struct ssl_cert_info *certs, } -static void *myrealloc(void *ptr, size_t len, void *pw) -{ - if (len == 0) { - free(ptr); - return NULL; - } - - return realloc(ptr, len); -} - void gui_quit(void) { LOG(("gui_quit")); - hubbub_finalise(myrealloc, NULL); + hubbub_finalise(ns_realloc, NULL); } static void gui_init(int argc, char** argv) @@ -2309,7 +2299,7 @@ static void gui_init(int argc, char** argv) nsws_find_resource(buf, "Aliases", "./windows/res/Aliases"); LOG(("Using '%s' as Aliases file", buf)); - hubbub_error he = hubbub_initialise(buf, myrealloc, NULL); + hubbub_error he = hubbub_initialise(buf, ns_realloc, NULL); LOG(("hubbub init %d", he)); if (he != HUBBUB_OK) die("Unable to initialise HTML parsing library.\n"); |