diff options
| author | Michael Biebl <biebl@debian.org> | 2017-11-07 00:15:27 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2017-11-07 00:15:27 +0100 |
| commit | 8254edbf64d60bef0d70eee01490103148dba100 (patch) | |
| tree | 282eb053995da653ee170e910da05d9530d4ff53 /src/nm-logging.h | |
| parent | 857e5310d1764114da056cd2eb3d88625bb0ba81 (diff) | |
| parent | 90e8691111889a7b5f3c812f5a41f15a8a058913 (diff) | |
Update upstream source from tag 'upstream/1.9.90'
Update to upstream version '1.9.90' with Debian dir 83533c23245795edf9fe4919e4af3e78f2938519
Diffstat (limited to 'src/nm-logging.h')
| -rw-r--r-- | src/nm-logging.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/nm-logging.h b/src/nm-logging.h index 91a41412..8fcbc8cc 100644 --- a/src/nm-logging.h +++ b/src/nm-logging.h @@ -142,11 +142,16 @@ typedef enum { /*< skip >*/ (prefix) ?: "", \ self _NM_UTILS_MACRO_REST(__VA_ARGS__)) +static inline gboolean +_nm_log_ptr_is_debug (NMLogLevel level) +{ + return level <= LOGL_DEBUG; +} + /* log a message for an object (with providing a generic @self pointer) */ #define nm_log_ptr(level, domain, ifname, con_uuid, self, prefix, ...) \ G_STMT_START { \ - NM_PRAGMA_WARNING_DISABLE("-Wtautological-compare") \ - if ((level) <= LOGL_DEBUG) { \ + if (_nm_log_ptr_is_debug (level)) { \ _nm_log_ptr ((level), \ (domain), \ (ifname), \ @@ -165,7 +170,6 @@ typedef enum { /*< skip >*/ __prefix ?: "", \ __prefix ? " " : "" _NM_UTILS_MACRO_REST(__VA_ARGS__)); \ } \ - NM_PRAGMA_WARNING_REENABLE \ } G_STMT_END @@ -269,7 +273,7 @@ gboolean nm_logging_syslog_enabled (void); /*****************************************************************************/ /* Some implementation define a second set of logging macros, for a separate - * use. As with the _LOGD() macro familiy above, the exact implementation + * use. As with the _LOGD() macro family above, the exact implementation * depends on the file that uses them. * Still, it encourages a common pattern to have the common set of macros * like _LOG2D(), _LOG2I(), etc. and have _LOG2t() which by default |