Skip to content
Browse files

logging: fix formatting

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
  • Loading branch information...
1 parent 2128d2e commit 95db93a4858c863382adfb57a450dbd72079c4c3 @fabbione committed Jan 29, 2013
Showing with 12 additions and 5 deletions.
  1. +1 −1 libknet/libknet.h
  2. +11 −4 libknet/logging.h
View
2 libknet/libknet.h
@@ -695,7 +695,7 @@ int knet_link_get_status(knet_handle_t knet_h, uint16_t host_id, uint8_t link_id
#define KNET_SUB_FILTER 9 /* (ether)filter errors */
#define KNET_SUB_CRYPTO 10 /* crypto.c generic layer */
#define KNET_SUB_NSSCRYPTO 11 /* nsscrypto.c */
-#define KNET_SUB_LAST KNET_SUB_NSSCRYPTO
+#define KNET_SUB_LAST KNET_SUB_NSSCRYPTO
#define KNET_MAX_SUBSYSTEMS KNET_SUB_LAST + 1
#define KNET_LOG_ERR 0 /* unrecoverable errors/conditions */
View
15 libknet/logging.h
@@ -15,9 +15,16 @@
void log_msg(knet_handle_t knet_h, uint8_t subsystem, uint8_t msglevel,
const char *fmt, ...) __attribute__((format(printf, 4, 5)));;
-#define log_err(knet_h, subsys, fmt, args...) log_msg(knet_h, subsys, KNET_LOG_ERR, fmt, ##args)
-#define log_warn(knet_h, subsys, fmt, args...) log_msg(knet_h, subsys, KNET_LOG_WARN, fmt, ##args)
-#define log_info(knet_h, subsys, fmt, args...) log_msg(knet_h, subsys, KNET_LOG_INFO, fmt, ##args)
-#define log_debug(knet_h, subsys, fmt, args...) log_msg(knet_h, subsys, KNET_LOG_DEBUG, fmt, ##args)
+#define log_err(knet_h, subsys, fmt, args...) \
+ log_msg(knet_h, subsys, KNET_LOG_ERR, fmt, ##args)
+
+#define log_warn(knet_h, subsys, fmt, args...) \
+ log_msg(knet_h, subsys, KNET_LOG_WARN, fmt, ##args)
+
+#define log_info(knet_h, subsys, fmt, args...) \
+ log_msg(knet_h, subsys, KNET_LOG_INFO, fmt, ##args)
+
+#define log_debug(knet_h, subsys, fmt, args...) \
+ log_msg(knet_h, subsys, KNET_LOG_DEBUG, fmt, ##args)
#endif

0 comments on commit 95db93a

Please sign in to comment.
Something went wrong with that request. Please try again.