mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
pam-util: make pam_debug_syslog_errno() returns pam error
Currently, the result of pam_debug_syslog_errno() is unused, hence this does not change anything and may be slightly redundant. But let's follow our usual coding style.
This commit is contained in:
@@ -47,8 +47,10 @@ int pam_syslog_pam_error(pam_handle_t *handle, int level, int error, const char
|
||||
/* Call pam_syslog_errno if debug is enabled */
|
||||
#define pam_debug_syslog_errno(handle, debug, error, fmt, ...) \
|
||||
({ \
|
||||
if (debug) \
|
||||
pam_syslog_errno(handle, LOG_DEBUG, error, fmt, ## __VA_ARGS__); \
|
||||
int _error = (error); \
|
||||
debug ? \
|
||||
pam_syslog_errno(handle, LOG_DEBUG, _error, fmt, ## __VA_ARGS__) : \
|
||||
errno_to_pam_error(_error); \
|
||||
})
|
||||
|
||||
static inline int pam_log_oom(pam_handle_t *handle) {
|
||||
|
||||
Reference in New Issue
Block a user