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 /desktop/searchweb.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 'desktop/searchweb.c')
-rw-r--r-- | desktop/searchweb.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/desktop/searchweb.c b/desktop/searchweb.c index 64d9d40b4..4033f8ef0 100644 --- a/desktop/searchweb.c +++ b/desktop/searchweb.c @@ -285,16 +285,13 @@ search_web_ico_callback(hlcache_handle *ico, switch (event->type) { case CONTENT_MSG_DONE: - LOG(("icon '%s' retrived", - nsurl_access(hlcache_handle_get_url(ico)))); + LOG("icon '%s' retrived", nsurl_access(hlcache_handle_get_url(ico))); guit->search_web->provider_update(provider->name, content_get_bitmap(ico)); break; case CONTENT_MSG_ERROR: - LOG(("icon %s error: %s", - nsurl_access(hlcache_handle_get_url(ico)), - event->data.error)); + LOG("icon %s error: %s", nsurl_access(hlcache_handle_get_url(ico)), event->data.error); hlcache_handle_release(ico); /* clear reference to released handle */ provider->ico_handle = NULL; @@ -437,8 +434,7 @@ default_ico_callback(hlcache_handle *ico, switch (event->type) { case CONTENT_MSG_DONE: - LOG(("default icon '%s' retrived", - nsurl_access(hlcache_handle_get_url(ico)))); + LOG("default icon '%s' retrived", nsurl_access(hlcache_handle_get_url(ico))); /* only set to default icon if providers icon has no handle */ if (ctx->providers[search_web_ctx.current].ico_handle == NULL) { @@ -449,9 +445,7 @@ default_ico_callback(hlcache_handle *ico, break; case CONTENT_MSG_ERROR: - LOG(("icon %s error: %s", - nsurl_access(hlcache_handle_get_url(ico)), - event->data.error)); + LOG("icon %s error: %s", nsurl_access(hlcache_handle_get_url(ico)), event->data.error); hlcache_handle_release(ico); /* clear reference to released handle */ ctx->default_ico_handle = NULL; |