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 /atari/treeview.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 'atari/treeview.c')
-rw-r--r-- | atari/treeview.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/atari/treeview.c b/atari/treeview.c index 2f99cbc8a..20ac3e7fe 100644 --- a/atari/treeview.c +++ b/atari/treeview.c @@ -326,8 +326,7 @@ static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8]) on_keybd_event(cw, ev_out, msg); } if( (ev_out->emo_events & MU_BUTTON) != 0 ) { - LOG(("Treeview click at: %d,%d\n", ev_out->emo_mouse.p_x, - ev_out->emo_mouse.p_y)); + LOG("Treeview click at: %d,%d\n", ev_out->emo_mouse.p_x, ev_out->emo_mouse.p_y); on_mbutton_event(cw, ev_out, msg); } @@ -528,7 +527,7 @@ atari_treeview_create(GUIWIN *win, struct atari_treeview_callbacks * callbacks, tv = calloc(1, sizeof(struct atari_treeview_window)); if (tv == NULL) { - LOG(("calloc failed")); + LOG("calloc failed"); warn_user(messages_get_errorcode(NSERROR_NOMEM), 0); return NULL; } |