Skip to content

Commit

Permalink
log: add error_ret()
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Apr 7, 2021
1 parent b425aad commit b33f435
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lxc/log.h
Expand Up @@ -583,6 +583,13 @@ __lxc_unused static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo, \
__internal_ret__; \
})

#define error_ret(__ret__, format, ...) \
({ \
typeof(__ret__) __internal_ret__ = (__ret__); \
ERROR(format, ##__VA_ARGS__); \
__internal_ret__; \
})

#define syswarn(format, ...) \
({ \
SYSWARN(format, ##__VA_ARGS__); \
Expand Down

0 comments on commit b33f435

Please sign in to comment.