[CRIU] [PATCH 1/4 v2] compel/include/log.h: whitespace cleanup
Kir Kolyshkin
kir at openvz.org
Sun Feb 12 03:34:18 PST 2017
Those macros look twice as long as they should be on my 80-columns
terminal. As there is nothing here to justify such width, go ahead
and remove the extra tabs, keeping the code within 80 cols.
v2: fix a bad bad typo
Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
compel/include/log.h | 57 ++++++++++++++++++++++++++--------------------------
1 file changed, 29 insertions(+), 28 deletions(-)
diff --git a/compel/include/log.h b/compel/include/log.h
index 4619e8a..5423cb8 100644
--- a/compel/include/log.h
+++ b/compel/include/log.h
@@ -13,49 +13,50 @@ static inline int pr_quelled(unsigned int loglevel)
return compel_log_get_loglevel() < loglevel && loglevel != LOG_MSG;
}
-extern void compel_print_on_level(unsigned int loglevel, const char *format, ...);
+extern void compel_print_on_level(unsigned int loglevel,
+ const char *format, ...);
-#define pr_msg(fmt, ...) \
- compel_print_on_level(LOG_MSG, \
+#define pr_msg(fmt, ...) \
+ compel_print_on_level(LOG_MSG, \
fmt, ##__VA_ARGS__)
-#define pr_info(fmt, ...) \
- compel_print_on_level(LOG_INFO, \
+#define pr_info(fmt, ...) \
+ compel_print_on_level(LOG_INFO, \
LOG_PREFIX fmt, ##__VA_ARGS__)
-#define pr_err(fmt, ...) \
- compel_print_on_level(LOG_ERROR, \
- "Error (%s:%d): " LOG_PREFIX fmt, \
+#define pr_err(fmt, ...) \
+ compel_print_on_level(LOG_ERROR, \
+ "Error (%s:%d): " LOG_PREFIX fmt, \
__FILE__, __LINE__, ##__VA_ARGS__)
-#define pr_err_once(fmt, ...) \
- do { \
- static bool __printed; \
- if (!__printed) { \
- pr_err(fmt, ##__VA_ARGS__); \
- __printed = 1; \
- } \
+#define pr_err_once(fmt, ...) \
+ do { \
+ static bool __printed; \
+ if (!__printed) { \
+ pr_err(fmt, ##__VA_ARGS__); \
+ __printed = 1; \
+ } \
} while (0)
-#define pr_warn(fmt, ...) \
- compel_print_on_level(LOG_WARN, \
- "Warn (%s:%d): " LOG_PREFIX fmt, \
+#define pr_warn(fmt, ...) \
+ compel_print_on_level(LOG_WARN, \
+ "Warn (%s:%d): " LOG_PREFIX fmt, \
__FILE__, __LINE__, ##__VA_ARGS__)
-#define pr_warn_once(fmt, ...) \
- do { \
- static bool __printed; \
- if (!__printed) { \
- pr_warn(fmt, ##__VA_ARGS__); \
- __printed = 1; \
- } \
+#define pr_warn_once(fmt, ...) \
+ do { \
+ static bool __printed; \
+ if (!__printed) { \
+ pr_warn(fmt, ##__VA_ARGS__); \
+ __printed = 1; \
+ } \
} while (0)
-#define pr_debug(fmt, ...) \
- compel_print_on_level(LOG_DEBUG, \
+#define pr_debug(fmt, ...) \
+ compel_print_on_level(LOG_DEBUG, \
LOG_PREFIX fmt, ##__VA_ARGS__)
-#define pr_perror(fmt, ...) \
+#define pr_perror(fmt, ...) \
pr_err(fmt ": %m\n", ##__VA_ARGS__)
#endif /* COMPEL_LOG_H__ */
--
2.9.3
More information about the CRIU
mailing list