]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/audit-fd.c
build-sys: use #if Y instead of #ifdef Y everywhere
[thirdparty/systemd.git] / src / core / audit-fd.c
index a91906b626de037b5d33833673c9be91ff0eb17b..6207f8185e739fd768325f48ef6ed5d54487077c 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "audit-fd.h"
 
-#ifdef HAVE_AUDIT
+#if HAVE_AUDIT
 
 #include <libaudit.h>
 #include <stdbool.h>
@@ -48,7 +48,7 @@ int get_audit_fd(void) {
                 audit_fd = audit_open();
 
                 if (audit_fd < 0) {
-                        if (errno != EAFNOSUPPORT && errno != EPROTONOSUPPORT)
+                        if (!IN_SET(errno, EAFNOSUPPORT, EPROTONOSUPPORT))
                                 log_error_errno(errno, "Failed to connect to audit log: %m");
 
                         audit_fd = errno ? -errno : -EINVAL;