mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 04:20:23 +01:00
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.
(cherry picked from commit 2458ddf5e9)
This commit is contained in:
parent
2f53e0dfbc
commit
97f9b03119
1 changed files with 1 additions and 1 deletions
|
|
@ -105,7 +105,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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue