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 /image/rsvg.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 'image/rsvg.c')
-rw-r--r-- | image/rsvg.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/image/rsvg.c b/image/rsvg.c index 3dd27fed6..4ffb43aa8 100644 --- a/image/rsvg.c +++ b/image/rsvg.c @@ -66,7 +66,7 @@ static nserror rsvg_create_svg_data(rsvg_content *c) c->bitmap = NULL; if ((c->rsvgh = rsvg_handle_new()) == NULL) { - LOG(("rsvg_handle_new() returned NULL.")); + LOG("rsvg_handle_new() returned NULL."); msg_data.error = messages_get("NoMemory"); content_broadcast(&c->base, CONTENT_MSG_ERROR, msg_data); return NSERROR_NOMEM; @@ -116,7 +116,7 @@ static bool rsvg_process_data(struct content *c, const char *data, if (rsvg_handle_write(d->rsvgh, (const guchar *)data, (gsize)size, &err) == FALSE) { - LOG(("rsvg_handle_write returned an error: %s", err->message)); + LOG("rsvg_handle_write returned an error: %s", err->message); msg_data.error = err->message; content_broadcast(c, CONTENT_MSG_ERROR, msg_data); return false; @@ -162,7 +162,7 @@ static bool rsvg_convert(struct content *c) GError *err = NULL; if (rsvg_handle_close(d->rsvgh, &err) == FALSE) { - LOG(("rsvg_handle_close returned an error: %s", err->message)); + LOG("rsvg_handle_close returned an error: %s", err->message); msg_data.error = err->message; content_broadcast(c, CONTENT_MSG_ERROR, msg_data); return false; @@ -180,7 +180,7 @@ static bool rsvg_convert(struct content *c) if ((d->bitmap = guit->bitmap->create(c->width, c->height, BITMAP_NEW)) == NULL) { - LOG(("Failed to create bitmap for rsvg render.")); + LOG("Failed to create bitmap for rsvg render."); msg_data.error = messages_get("NoMemory"); content_broadcast(c, CONTENT_MSG_ERROR, msg_data); return false; @@ -191,14 +191,14 @@ static bool rsvg_convert(struct content *c) CAIRO_FORMAT_ARGB32, c->width, c->height, guit->bitmap->get_rowstride(d->bitmap))) == NULL) { - LOG(("Failed to create Cairo image surface for rsvg render.")); + LOG("Failed to create Cairo image surface for rsvg render."); msg_data.error = messages_get("NoMemory"); content_broadcast(c, CONTENT_MSG_ERROR, msg_data); return false; } if ((d->ct = cairo_create(d->cs)) == NULL) { - LOG(("Failed to create Cairo drawing context for rsvg render.")); + LOG("Failed to create Cairo drawing context for rsvg render."); msg_data.error = messages_get("NoMemory"); content_broadcast(c, CONTENT_MSG_ERROR, msg_data); return false; |