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 /desktop/global_history.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 'desktop/global_history.c')
-rw-r--r-- | desktop/global_history.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/desktop/global_history.c b/desktop/global_history.c index 2cb0c91a6..9fa1d6de7 100644 --- a/desktop/global_history.c +++ b/desktop/global_history.c @@ -594,7 +594,7 @@ static nserror global_history_initialise_time(void) /* get the current time */ t = time(NULL); if (t == -1) { - LOG(("time info unaviable")); + LOG("time info unaviable"); return NSERROR_UNKNOWN; } @@ -605,7 +605,7 @@ static nserror global_history_initialise_time(void) full_time->tm_hour = 0; t = mktime(full_time); if (t == -1) { - LOG(("mktime failed")); + LOG("mktime failed"); return NSERROR_UNKNOWN; } @@ -722,7 +722,7 @@ nserror global_history_init(struct core_window_callback_table *cw_t, { nserror err; - LOG(("Loading global history")); + LOG("Loading global history"); /* Init. global history treeview time */ err = global_history_initialise_time(); @@ -778,7 +778,7 @@ nserror global_history_init(struct core_window_callback_table *cw_t, /* Inform client of window height */ treeview_get_height(gh_ctx.tree); - LOG(("Loaded global history")); + LOG("Loaded global history"); return NSERROR_OK; } @@ -790,7 +790,7 @@ nserror global_history_fini(void) int i; nserror err; - LOG(("Finalising global history")); + LOG("Finalising global history"); gh_ctx.built = false; @@ -802,7 +802,7 @@ nserror global_history_fini(void) if (gh_ctx.fields[i].field != NULL) lwc_string_unref(gh_ctx.fields[i].field); - LOG(("Finalised global history")); + LOG("Finalised global history"); return err; } @@ -819,7 +819,7 @@ nserror global_history_add(nsurl *url) data = urldb_get_url_data(url); if (data == NULL) { - LOG(("Can't add URL to history that's not present in urldb.")); + LOG("Can't add URL to history that's not present in urldb."); return NSERROR_BAD_PARAMETER; } |