summaryrefslogtreecommitdiff
path: root/src/libnm-log-core
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2021-07-09 08:48:48 +0200
committerThomas Haller <thaller@redhat.com>2021-07-09 08:49:06 +0200
commit4e109bacabde005eefa613055049adc27010fa5b (patch)
tree69e8ee4189d1fa5e8a05437e89d14ec1fe2e4eb7 /src/libnm-log-core
parentdedd2286676a8445787f48feff1dfb5acf5f4c78 (diff)
downloadNetworkManager-4e109bacabde005eefa613055049adc27010fa5b.tar.gz
clang-format: use "IndentPPDirectives:None" instead of "BeforeHash"
Subjectively, I think this looks better.
Diffstat (limited to 'src/libnm-log-core')
-rw-r--r--src/libnm-log-core/nm-logging.c62
-rw-r--r--src/libnm-log-core/nm-logging.h2
2 files changed, 32 insertions, 32 deletions
diff --git a/src/libnm-log-core/nm-logging.c b/src/libnm-log-core/nm-logging.c
index 2ab0d92e07..aca0e02f64 100644
--- a/src/libnm-log-core/nm-logging.c
+++ b/src/libnm-log-core/nm-logging.c
@@ -18,8 +18,8 @@
#include <strings.h>
#if SYSTEMD_JOURNAL
- #define SD_JOURNAL_SUPPRESS_LOCATION
- #include <systemd/sd-journal.h>
+#define SD_JOURNAL_SUPPRESS_LOCATION
+#include <systemd/sd-journal.h>
#endif
#include "libnm-glib-aux/nm-logging-base.h"
@@ -600,7 +600,7 @@ _iovec_set_string(struct iovec *iov, const char *str)
_iovec_set(iov, str, strlen(str));
}
- #define _iovec_set_string_literal(iov, str) _iovec_set((iov), "" str "", NM_STRLEN(str))
+#define _iovec_set_string_literal(iov, str) _iovec_set((iov), "" str "", NM_STRLEN(str))
_nm_printf(3, 4) static void _iovec_set_format(struct iovec *iov,
char ** iov_free,
@@ -618,34 +618,34 @@ _nm_printf(3, 4) static void _iovec_set_format(struct iovec *iov,
*iov_free = str;
}
- #define _iovec_set_format_a(iov, reserve_extra, format, ...) \
- G_STMT_START \
- { \
- const gsize _size = (reserve_extra) + (NM_STRLEN(format) + 3); \
- char *const _buf = g_alloca(_size); \
- int _len; \
- \
- G_STATIC_ASSERT_EXPR((reserve_extra) + (NM_STRLEN(format) + 3) <= 96); \
- \
- _len = g_snprintf(_buf, _size, "" format "", ##__VA_ARGS__); \
- \
- nm_assert(_len >= 0); \
- nm_assert(_len < _size); \
- nm_assert(_len == strlen(_buf)); \
- \
- _iovec_set((iov), _buf, _len); \
- } \
- G_STMT_END
-
- #define _iovec_set_format_str_a(iov, max_str_len, format, str_arg) \
- G_STMT_START \
- { \
- const char *_str_arg = (str_arg); \
- \
- nm_assert(_str_arg &&strlen(_str_arg) < (max_str_len)); \
- _iovec_set_format_a((iov), (max_str_len), format, str_arg); \
- } \
- G_STMT_END
+#define _iovec_set_format_a(iov, reserve_extra, format, ...) \
+ G_STMT_START \
+ { \
+ const gsize _size = (reserve_extra) + (NM_STRLEN(format) + 3); \
+ char *const _buf = g_alloca(_size); \
+ int _len; \
+ \
+ G_STATIC_ASSERT_EXPR((reserve_extra) + (NM_STRLEN(format) + 3) <= 96); \
+ \
+ _len = g_snprintf(_buf, _size, "" format "", ##__VA_ARGS__); \
+ \
+ nm_assert(_len >= 0); \
+ nm_assert(_len < _size); \
+ nm_assert(_len == strlen(_buf)); \
+ \
+ _iovec_set((iov), _buf, _len); \
+ } \
+ G_STMT_END
+
+#define _iovec_set_format_str_a(iov, max_str_len, format, str_arg) \
+ G_STMT_START \
+ { \
+ const char *_str_arg = (str_arg); \
+ \
+ nm_assert(_str_arg &&strlen(_str_arg) < (max_str_len)); \
+ _iovec_set_format_a((iov), (max_str_len), format, str_arg); \
+ } \
+ G_STMT_END
#endif
diff --git a/src/libnm-log-core/nm-logging.h b/src/libnm-log-core/nm-logging.h
index 8eecb7e41b..8071967552 100644
--- a/src/libnm-log-core/nm-logging.h
+++ b/src/libnm-log-core/nm-logging.h
@@ -8,7 +8,7 @@
#define __NETWORKMANAGER_LOGGING_H__
#ifdef __NM_TEST_UTILS_H__
- #error nm-test-utils.h must be included as last header
+#error nm-test-utils.h must be included as last header
#endif
#include "libnm-glib-aux/nm-logging-fwd.h"