diff options
author | Vincent Sanders <vince@kyllikki.org> | 2015-05-28 16:08:46 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2015-05-28 16:08:46 +0100 |
commit | c105738fa36bb2400adc47399c5b878d252d1c86 (patch) | |
tree | 138eeb449e1bf51ee1726b5f820740aada0ccd0b /render/html_css_fetcher.c | |
parent | 20f2c86a511f7913cf858e7bd3668b0b59663ba0 (diff) | |
download | netsurf-c105738fa36bb2400adc47399c5b878d252d1c86.tar.gz netsurf-c105738fa36bb2400adc47399c5b878d252d1c86.tar.bz2 |
Change LOG() macro to be varadic
This changes the LOG macro to be varadic removing the need for all
callsites to have double bracketing and allows for future improvement
on how we use the logging macros.
The callsites were changed with coccinelle and the changes checked by
hand. Compile tested for several frontends but not all.
A formatting annotation has also been added which allows the compiler
to check the parameters and types passed to the logging.
Diffstat (limited to 'render/html_css_fetcher.c')
-rw-r--r-- | render/html_css_fetcher.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/render/html_css_fetcher.c b/render/html_css_fetcher.c index 8ac9123b0..b676fedec 100644 --- a/render/html_css_fetcher.c +++ b/render/html_css_fetcher.c @@ -61,13 +61,13 @@ static html_css_fetcher_context *ring = NULL; static bool html_css_fetcher_initialise(lwc_string *scheme) { - LOG(("html_css_fetcher_initialise called for %s", lwc_string_data(scheme))); + LOG("html_css_fetcher_initialise called for %s", lwc_string_data(scheme)); return true; } static void html_css_fetcher_finalise(lwc_string *scheme) { - LOG(("html_css_fetcher_finalise called for %s", lwc_string_data(scheme))); + LOG("html_css_fetcher_finalise called for %s", lwc_string_data(scheme)); } static bool html_css_fetcher_can_fetch(const nsurl *url) @@ -251,8 +251,7 @@ static void html_css_fetcher_poll(lwc_string *scheme) html_css_fetcher_send_callback(&msg, c); } } else { - LOG(("Processing of %s failed!", - nsurl_access(c->url))); + LOG("Processing of %s failed!", nsurl_access(c->url)); /* Ensure that we're unlocked here. If we aren't, * then html_css_fetcher_process() is broken. @@ -291,7 +290,7 @@ nserror html_css_fetcher_register(void) if (lwc_intern_string("x-ns-css", SLEN("x-ns-css"), &scheme) != lwc_error_ok) { - LOG(("could not intern \"x-ns-css\".")); + LOG("could not intern \"x-ns-css\"."); return NSERROR_INIT_FAILED; } |