summaryrefslogtreecommitdiff
path: root/render/html_object.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2015-05-28 16:08:46 +0100
committerVincent Sanders <vince@kyllikki.org>2015-05-28 16:08:46 +0100
commitc105738fa36bb2400adc47399c5b878d252d1c86 (patch)
tree138eeb449e1bf51ee1726b5f820740aada0ccd0b /render/html_object.c
parent20f2c86a511f7913cf858e7bd3668b0b59663ba0 (diff)
downloadnetsurf-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_object.c')
-rw-r--r--render/html_object.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/render/html_object.c b/render/html_object.c
index 455733d0a..335abd1fc 100644
--- a/render/html_object.c
+++ b/render/html_object.c
@@ -158,7 +158,7 @@ html_object_callback(hlcache_handle *object,
case CONTENT_MSG_DONE:
c->base.active--;
- LOG(("%d fetches active", c->base.active));
+ LOG("%d fetches active", c->base.active);
html_object_done(box, object, o->background);
@@ -188,7 +188,7 @@ html_object_callback(hlcache_handle *object,
if (box != NULL) {
c->base.active--;
- LOG(("%d fetches active", c->base.active));
+ LOG("%d fetches active", c->base.active);
content_add_error(&c->base, "?", 0);
html_object_failed(box, c, o->background);
@@ -507,7 +507,7 @@ static bool html_replace_object(struct content_html_object *object, nsurl *url)
/* remove existing object */
if (content_get_status(object->content) != CONTENT_STATUS_DONE) {
c->base.active--;
- LOG(("%d fetches active", c->base.active));
+ LOG("%d fetches active", c->base.active);
}
hlcache_handle_release(object->content);
@@ -528,7 +528,7 @@ static bool html_replace_object(struct content_html_object *object, nsurl *url)
for (page = c; page != NULL; page = page->page) {
page->base.active++;
- LOG(("%d fetches active", c->base.active));
+ LOG("%d fetches active", c->base.active);
page->base.status = CONTENT_STATUS_READY;
}
@@ -611,7 +611,7 @@ nserror html_object_abort_objects(html_content *htmlc)
object->content = NULL;
htmlc->base.active--;
- LOG(("%d fetches active", htmlc->base.active));
+ LOG("%d fetches active", htmlc->base.active);
break;
}
@@ -648,7 +648,7 @@ nserror html_object_free_objects(html_content *html)
struct content_html_object *victim = html->object_list;
if (victim->content != NULL) {
- LOG(("object %p", victim->content));
+ LOG("object %p", victim->content);
if (content_get_type(victim->content) == CONTENT_HTML) {
guit->browser->schedule(-1, html_object_refresh, victim);
@@ -710,7 +710,7 @@ bool html_fetch_object(html_content *c, nsurl *url, struct box *box,
c->num_objects++;
if (box != NULL) {
c->base.active++;
- LOG(("%d fetches active", c->base.active));
+ LOG("%d fetches active", c->base.active);
}
return true;