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 /content/fetch.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 'content/fetch.c')
-rw-r--r-- | content/fetch.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/content/fetch.c b/content/fetch.c index 0ca90413a..158eb7c07 100644 --- a/content/fetch.c +++ b/content/fetch.c @@ -218,14 +218,14 @@ static void dump_rings(void) q = queue_ring; if (q) { do { - LOG(("queue_ring: %s", nsurl_access(q->url))); + LOG("queue_ring: %s", nsurl_access(q->url)); q = q->r_next; } while (q != queue_ring); } f = fetch_ring; if (f) { do { - LOG(("fetch_ring: %s", nsurl_access(f->url))); + LOG("fetch_ring: %s", nsurl_access(f->url)); f = f->r_next; } while (f != fetch_ring); } @@ -340,9 +340,7 @@ void fetcher_quit(void) * the reference count to allow the fetcher to * be stopped. */ - LOG(("Fetcher for scheme %s still has %d active users at quit.", - lwc_string_data(fetchers[fetcherd].scheme), - fetchers[fetcherd].refcount)); + LOG("Fetcher for scheme %s still has %d active users at quit.", lwc_string_data(fetchers[fetcherd].scheme), fetchers[fetcherd].refcount); fetchers[fetcherd].refcount = 1; } @@ -748,9 +746,9 @@ void fetch_remove_from_queues(struct fetch *fetch) RING_GETSIZE(struct fetch, fetch_ring, all_active); RING_GETSIZE(struct fetch, queue_ring, all_queued); - LOG(("Fetch ring is now %d elements.", all_active)); + LOG("Fetch ring is now %d elements.", all_active); - LOG(("Queue ring is now %d elements.", all_queued)); + LOG("Queue ring is now %d elements.", all_queued); #endif } |