summaryrefslogtreecommitdiff
path: root/riscos/url_protocol.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 /riscos/url_protocol.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 'riscos/url_protocol.c')
-rw-r--r--riscos/url_protocol.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/riscos/url_protocol.c b/riscos/url_protocol.c
index 6c5bdac9a..9fa888269 100644
--- a/riscos/url_protocol.c
+++ b/riscos/url_protocol.c
@@ -74,17 +74,17 @@ void ro_url_message_received(wimp_message *message)
} else {
if (!url_message->indirect.url.offset) {
- LOG(("no URL in message"));
+ LOG("no URL in message");
return;
}
if (28 < message->size &&
url_message->indirect.body_file.offset) {
- LOG(("POST for URL message not implemented"));
+ LOG("POST for URL message not implemented");
return;
}
if (url_message->indirect.url.offset < 28 ||
236 <= url_message->indirect.url.offset) {
- LOG(("external pointers in URL message unimplemented"));
+ LOG("external pointers in URL message unimplemented");
/* these messages have never been seen in the wild,
* and there is the problem of invalid addresses which
* would cause an abort */
@@ -121,8 +121,7 @@ void ro_url_message_received(wimp_message *message)
error = xwimp_send_message(wimp_USER_MESSAGE_ACKNOWLEDGE, message,
message->sender);
if (error) {
- LOG(("xwimp_send_message: 0x%x: %s",
- error->errnum, error->errmess));
+ LOG("xwimp_send_message: 0x%x: %s", error->errnum, error->errmess);
warn_user("WimpError", error->errmess);
}
@@ -165,8 +164,7 @@ void ro_url_broadcast(const char *url)
error = xwimp_send_message(wimp_USER_MESSAGE_RECORDED,
(wimp_message *) &message, 0);
if (error) {
- LOG(("xwimp_send_message: 0x%x: %s",
- error->errnum, error->errmess));
+ LOG("xwimp_send_message: 0x%x: %s", error->errnum, error->errmess);
warn_user("WimpError", error->errmess);
}
}
@@ -185,7 +183,7 @@ void ro_url_load(const char *url)
colon = strchr(url, ':');
if (!colon) {
- LOG(("invalid url '%s'", url));
+ LOG("invalid url '%s'", url);
return;
}
@@ -205,8 +203,7 @@ void ro_url_load(const char *url)
error = xwimp_start_task(command, 0);
if (error) {
- LOG(("xwimp_start_task: 0x%x: %s",
- error->errnum, error->errmess));
+ LOG("xwimp_start_task: 0x%x: %s", error->errnum, error->errmess);
warn_user("WimpError", error->errmess);
}