along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#ifdef HAVE_SELINUX
+#if HAVE_SELINUX
#include <selinux/selinux.h>
#endif
#include <sys/ioctl.h>
}
static void server_add_acls(JournalFile *f, uid_t uid) {
-#ifdef HAVE_ACL
+#if HAVE_ACL
int r;
#endif
assert(f);
-#ifdef HAVE_ACL
+#if HAVE_ACL
if (uid <= SYSTEM_UID_MAX)
return;
(void) cache_space_refresh(s, &s->system_storage);
patch_min_use(&s->system_storage);
} else if (r < 0) {
- if (r != -ENOENT && r != -EROFS)
+ if (!IN_SET(r, -ENOENT, -EROFS))
log_warning_errno(r, "Failed to open system journal: %m");
r = 0;
CONF_PATHS_NULSTR("systemd/journald.conf.d"),
"Journal\0",
config_item_perf_lookup, journald_gperf_lookup,
- false, s);
+ CONFIG_PARSE_WARN, s);
}
static int server_dispatch_sync(sd_event_source *es, usec_t t, void *userdata) {
if (!e)
return 0;
- if ((e[0] != '@' && e[0] != '/') || e[1] == 0) {
+ if (!IN_SET(e[0], '@', '/') || e[1] == 0) {
log_error("NOTIFY_SOCKET set to an invalid value: %s", e);
return -EINVAL;
}
}
void server_maybe_append_tags(Server *s) {
-#ifdef HAVE_GCRYPT
+#if HAVE_GCRYPT
JournalFile *f;
Iterator i;
usec_t n;