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 /riscos/image.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 'riscos/image.c')
-rw-r--r-- | riscos/image.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/riscos/image.c b/riscos/image.c index 18ad4859e..63e65f27b 100644 --- a/riscos/image.c +++ b/riscos/image.c @@ -142,8 +142,7 @@ bool image_redraw_tinct(osspriteop_id header, int x, int y, } if (error) { - LOG(("xtinct_plotscaled%s: 0x%x: %s", (alpha ? "alpha" : ""), - error->errnum, error->errmess)); + LOG("xtinct_plotscaled%s: 0x%x: %s", (alpha ? "alpha" : ""), error->errnum, error->errmess); return false; } @@ -177,14 +176,13 @@ bool image_redraw_os(osspriteop_id header, int x, int y, int req_width, colourtrans_CURRENT_PALETTE, 0, colourtrans_GIVEN_SPRITE, 0, 0, &size); if (error) { - LOG(("xcolourtrans_generate_table_for_sprite: 0x%x: %s", - error->errnum, error->errmess)); + LOG("xcolourtrans_generate_table_for_sprite: 0x%x: %s", error->errnum, error->errmess); return false; } table = calloc(size, sizeof(char)); if (!table) { - LOG(("malloc failed")); + LOG("malloc failed"); warn_user("NoMemory", 0); return false; } @@ -195,8 +193,7 @@ bool image_redraw_os(osspriteop_id header, int x, int y, int req_width, colourtrans_CURRENT_PALETTE, table, colourtrans_GIVEN_SPRITE, 0, 0, 0); if (error) { - LOG(("xcolourtrans_generate_table_for_sprite: 0x%x: %s", - error->errnum, error->errmess)); + LOG("xcolourtrans_generate_table_for_sprite: 0x%x: %s", error->errnum, error->errmess); free(table); return false; } @@ -211,8 +208,7 @@ bool image_redraw_os(osspriteop_id header, int x, int y, int req_width, x, (int)(y - req_height), 8, &f, table); if (error) { - LOG(("xosspriteop_put_sprite_scaled: 0x%x: %s", - error->errnum, error->errmess)); + LOG("xosspriteop_put_sprite_scaled: 0x%x: %s", error->errnum, error->errmess); free(table); return false; } |