summaryrefslogtreecommitdiff
path: root/desktop/treeview.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 /desktop/treeview.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 'desktop/treeview.c')
-rw-r--r--desktop/treeview.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/desktop/treeview.c b/desktop/treeview.c
index 35458f7fb..210c6f97e 100644
--- a/desktop/treeview.c
+++ b/desktop/treeview.c
@@ -1396,7 +1396,7 @@ static nserror treeview_node_expand_internal(treeview *tree,
if (node->flags & TV_NFLAGS_EXPANDED) {
/* What madness is this? */
- LOG(("Tried to expand an expanded node."));
+ LOG("Tried to expand an expanded node.");
return NSERROR_OK;
}
@@ -1540,7 +1540,7 @@ static nserror treeview_node_contract_internal(treeview *tree,
if ((node->flags & TV_NFLAGS_EXPANDED) == false) {
/* What madness is this? */
- LOG(("Tried to contract a contracted node."));
+ LOG("Tried to contract a contracted node.");
return NSERROR_OK;
}
@@ -2434,7 +2434,7 @@ static nserror treeview_move_selection(treeview *tree, struct rect *rect)
break;
default:
- LOG(("Bad drop target for move."));
+ LOG("Bad drop target for move.");
return NSERROR_BAD_PARAMETER;
}
@@ -3950,7 +3950,7 @@ nserror treeview_init(int font_pt_size)
if (tree_g.initialised == true)
return NSERROR_OK;
- LOG(("Initialising treeview module"));
+ LOG("Initialising treeview module");
if (font_pt_size <= 0)
font_pt_size = 11;
@@ -3972,7 +3972,7 @@ nserror treeview_init(int font_pt_size)
tree_g.initialised = true;
- LOG(("Initialised treeview module"));
+ LOG("Initialised treeview module");
return NSERROR_OK;
}
@@ -3983,7 +3983,7 @@ nserror treeview_fini(void)
{
int i;
- LOG(("Finalising treeview module"));
+ LOG("Finalising treeview module");
for (i = 0; i < TREE_RES_LAST; i++) {
hlcache_handle_release(treeview_res[i].c);
@@ -4000,7 +4000,7 @@ nserror treeview_fini(void)
tree_g.initialised = false;
- LOG(("Finalised treeview module"));
+ LOG("Finalised treeview module");
return NSERROR_OK;
}