]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/audit-fd.c
Add SPDX license identifiers to source files under the LGPL
[thirdparty/systemd.git] / src / core / audit-fd.c
index a91906b626de037b5d33833673c9be91ff0eb17b..60e79035af895c8e17777a77839032298a048d00 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
 /***
   This file is part of systemd.
 
@@ -22,7 +23,7 @@
 
 #include "audit-fd.h"
 
-#ifdef HAVE_AUDIT
+#if HAVE_AUDIT
 
 #include <libaudit.h>
 #include <stdbool.h>
@@ -48,7 +49,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;