From f1d34068ef8d657238235d04ea291ee1ca095129 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 15 Dec 2017 11:09:00 +0100 Subject: tree-wide: add DEBUG_LOGGING macro that checks whether debug logging is on (#7645) This makes things a bit easier to read I think, and also makes sure we always use the _unlikely_ wrapper around it, which so far we used sometimes and other times we didn't. Let's clean that up. --- coccinelle/debug-logging.cocci | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 coccinelle/debug-logging.cocci (limited to 'coccinelle') diff --git a/coccinelle/debug-logging.cocci b/coccinelle/debug-logging.cocci new file mode 100644 index 0000000000..9084cf773b --- /dev/null +++ b/coccinelle/debug-logging.cocci @@ -0,0 +1,8 @@ +@@ +@@ +- _unlikely_(log_get_max_level() >= LOG_DEBUG) ++ DEBUG_LOGGING +@@ +@@ +- log_get_max_level() >= LOG_DEBUG ++ DEBUG_LOGGING -- cgit v1.2.1