summaryrefslogtreecommitdiff
path: root/desktop/browser_history.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/browser_history.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/browser_history.c')
-rw-r--r--desktop/browser_history.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/desktop/browser_history.c b/desktop/browser_history.c
index 95f85bb6c..1ee800019 100644
--- a/desktop/browser_history.c
+++ b/desktop/browser_history.c
@@ -451,7 +451,7 @@ nserror browser_window_history_clone(const struct browser_window *existing,
new_history->start = browser_window_history__clone_entry(new_history,
new_history->start);
if (!new_history->start) {
- LOG(("Insufficient memory to clone history"));
+ LOG("Insufficient memory to clone history");
browser_window_history_destroy(clone);
clone->history = NULL;
return NSERROR_NOMEM;
@@ -516,7 +516,7 @@ nserror browser_window_history_add(struct browser_window *bw,
* loading */
bitmap = urldb_get_thumbnail(nsurl);
if (bitmap == NULL) {
- LOG(("Creating thumbnail for %s", nsurl_access(nsurl)));
+ LOG("Creating thumbnail for %s", nsurl_access(nsurl));
bitmap = guit->bitmap->create(WIDTH, HEIGHT,
BITMAP_NEW | BITMAP_CLEAR_MEMORY |
BITMAP_OPAQUE);
@@ -531,7 +531,7 @@ nserror browser_window_history_add(struct browser_window *bw,
/* Thumbnailing failed. Ignore it
* silently but clean up bitmap.
*/
- LOG(("Thumbnail renderfailed"));
+ LOG("Thumbnail renderfailed");
guit->bitmap->destroy(bitmap);
bitmap = NULL;
}
@@ -700,7 +700,7 @@ bool browser_window_history_redraw(struct browser_window *bw,
history = bw->history;
if (history == NULL) {
- LOG(("Attempt to draw NULL history."));
+ LOG("Attempt to draw NULL history.");
return false;
}