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 /framebuffer/bitmap.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 'framebuffer/bitmap.c')
-rw-r--r-- | framebuffer/bitmap.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/framebuffer/bitmap.c b/framebuffer/bitmap.c index 9f5b02524..b4907ada6 100644 --- a/framebuffer/bitmap.c +++ b/framebuffer/bitmap.c @@ -51,7 +51,7 @@ static void *bitmap_create(int width, int height, unsigned int state) { nsfb_t *bm; - LOG(("width %d, height %d, state %u",width,height,state)); + LOG("width %d, height %d, state %u", width, height, state); bm = nsfb_new(NSFB_SURFACE_RAM); if (bm == NULL) { @@ -69,7 +69,7 @@ static void *bitmap_create(int width, int height, unsigned int state) return NULL; } - LOG(("bitmap %p", bm)); + LOG("bitmap %p", bm); return bm; } @@ -197,11 +197,11 @@ static bool bitmap_test_opaque(void *bitmap) while (tst-- > 0) { if (bmpptr[(tst << 2) + 3] != 0xff) { - LOG(("bitmap %p has transparency",bm)); + LOG("bitmap %p has transparency", bm); return false; } } - LOG(("bitmap %p is opaque", bm)); + LOG("bitmap %p is opaque", bm); return true; } @@ -282,7 +282,7 @@ bitmap_render(struct bitmap *bitmap, nsfb_get_geometry(tbm, &width, &height, NULL); - LOG(("width %d, height %d", width, height)); + LOG("width %d, height %d", width, height); /* Calculate size of buffer to render the content into */ /* We get the width from the content width, unless it exceeds 1024, |