summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-04-22 10:13:06 +0200
committerThomas Haller <thaller@redhat.com>2015-04-22 10:26:35 +0200
commit2458ddf5e95ed74613c32780622e265eebb7e712 (patch)
treea896afc6d33b84d46ed713d5f0b1e8c60cd9f4fb
parentbdec5e2e5375faa9752738d070a287b72553b029 (diff)
downloadNetworkManager-2458ddf5e95ed74613c32780622e265eebb7e712.tar.gz
logging: ensure that the first argument of the logging statement is a C string
We don't want to pass unknown format strings to the logging macro. Catch that by concatenating "" with the format string.
-rw-r--r--src/nm-logging.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nm-logging.h b/src/nm-logging.h
index 4bdac3fe15..0a0da20b0f 100644
--- a/src/nm-logging.h
+++ b/src/nm-logging.h
@@ -104,7 +104,7 @@ typedef enum { /*< skip >*/
#define nm_log(level, domain, ...) \
G_STMT_START { \
if (nm_logging_enabled ((level), (domain))) { \
- _nm_log (__FILE__, __LINE__, G_STRFUNC, (level), (domain), 0, __VA_ARGS__); \
+ _nm_log (__FILE__, __LINE__, G_STRFUNC, (level), (domain), 0, ""__VA_ARGS__); \
} \
} G_STMT_END