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 /css/select.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 'css/select.c')
-rw-r--r-- | css/select.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/css/select.c b/css/select.c index b94bcac4f..f4570f7c2 100644 --- a/css/select.c +++ b/css/select.c @@ -190,20 +190,20 @@ css_stylesheet *nscss_create_inline_style(const uint8_t *data, size_t len, error = css_stylesheet_create(¶ms, &sheet); if (error != CSS_OK) { - LOG(("Failed creating sheet: %d", error)); + LOG("Failed creating sheet: %d", error); return NULL; } error = css_stylesheet_append_data(sheet, data, len); if (error != CSS_OK && error != CSS_NEEDDATA) { - LOG(("failed appending data: %d", error)); + LOG("failed appending data: %d", error); css_stylesheet_destroy(sheet); return NULL; } error = css_stylesheet_data_done(sheet); if (error != CSS_OK) { - LOG(("failed completing parse: %d", error)); + LOG("failed completing parse: %d", error); css_stylesheet_destroy(sheet); return NULL; } @@ -229,7 +229,7 @@ static void nscss_dom_user_data_handler(dom_node_operation operation, CSS_NODE_CLONED, NULL, src, dst, data); if (error != CSS_OK) - LOG(("Failed to clone libcss_node_data.")); + LOG("Failed to clone libcss_node_data."); break; case DOM_NODE_RENAMED: @@ -237,7 +237,7 @@ static void nscss_dom_user_data_handler(dom_node_operation operation, CSS_NODE_MODIFIED, NULL, src, NULL, data); if (error != CSS_OK) - LOG(("Failed to update libcss_node_data.")); + LOG("Failed to update libcss_node_data."); break; case DOM_NODE_IMPORTED: @@ -247,11 +247,11 @@ static void nscss_dom_user_data_handler(dom_node_operation operation, CSS_NODE_DELETED, NULL, src, NULL, data); if (error != CSS_OK) - LOG(("Failed to delete libcss_node_data.")); + LOG("Failed to delete libcss_node_data."); break; default: - LOG(("User data operation not handled.")); + LOG("User data operation not handled."); assert(0); } } |