On Tue, 2009-08-04 at 08:21 +0000, [email protected] wrote: > Modified: branches/MarkieB/gtkmain/content/fetchcache.c > URL: > http://source.netsurf-browser.org/branches/MarkieB/gtkmain/content/fetchcache.c?rev=9035&r1=9034&r2=9035&view=diff > ============================================================================== > --- branches/MarkieB/gtkmain/content/fetchcache.c (original) > +++ branches/MarkieB/gtkmain/content/fetchcache.c Tue Aug 4 03:21:47 2009 > @@ -1156,83 +1096,97 @@ > } > > free(scheme); > + fetchcache_redirect_common(c, parent_was_verifiable, url, referer, > parent); > + free(referer); > +} > + > +/** > + * common logic from fetchcache_redirect() / fetchcache_search_redirect() > + * \param c the content param from the original function > + * \param verifiable parent_was_verifiable [false for search_redirect] > + * \param url the url being considered; redirect_common() shall free() it > + * \param referer referer [ / NULL particularly for search_redirect] > + * \param parent parent content [ / c for search_redirect] > + */ > + > +void fetchcache_redirect_common(struct content *c, bool verifiable, char > *url, > + const char *referer, struct content *parent)
I would much prefer it if url was const here. This means that the caller must free it, which seems reasonable, given they created it. J.
