summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorShawn Landden <shawnlandden@gmail.com>2012-07-18 10:07:51 -0700
committerLennart Poettering <lennart@poettering.net>2012-07-19 12:30:59 +0200
commitc2f1db8f83618e60dcded8303d14656d7d26b436 (patch)
tree89d1212990819ff53f20680096497a2f1dd50b41 /src/core
parent4a842cadb8d6b30fa9fdc8ff183633c14e02cf96 (diff)
use #pragma once instead of foo*foo #define guards
#pragma once has been "un-deprecated" in gcc since 3.3, and is widely supported in other compilers. I've been using and maintaining (rebasing) this patch for a while now, as it annoyed me to see #ifndef fooblahfoo, etc all over the place, almost arrogant about the annoyance of having to define all these names to perform a commen but neccicary functionality, when a completely superior alternative exists. I havn't sent it till now, cause its kindof a style change, and it is bad voodoo to mess with style that has been established by more established editors. So feel free to lambast me as a crazy bafoon. v2 - preserve externally used headers
Diffstat (limited to 'src/core')
-rw-r--r--src/core/automount.h5
-rw-r--r--src/core/build.h5
-rw-r--r--src/core/bus-errors.h5
-rw-r--r--src/core/cgroup-attr.h5
-rw-r--r--src/core/cgroup.h5
-rw-r--r--src/core/condition.h5
-rw-r--r--src/core/dbus-automount.h5
-rw-r--r--src/core/dbus-device.h5
-rw-r--r--src/core/dbus-execute.h5
-rw-r--r--src/core/dbus-job.h5
-rw-r--r--src/core/dbus-manager.h5
-rw-r--r--src/core/dbus-mount.h5
-rw-r--r--src/core/dbus-path.h5
-rw-r--r--src/core/dbus-service.h5
-rw-r--r--src/core/dbus-snapshot.h5
-rw-r--r--src/core/dbus-socket.h5
-rw-r--r--src/core/dbus-swap.h5
-rw-r--r--src/core/dbus-target.h5
-rw-r--r--src/core/dbus-timer.h5
-rw-r--r--src/core/dbus-unit.h5
-rw-r--r--src/core/dbus.h5
-rw-r--r--src/core/device.h5
-rw-r--r--src/core/execute.h5
-rw-r--r--src/core/fdset.h5
-rw-r--r--src/core/hostname-setup.h5
-rw-r--r--src/core/ima-setup.h5
-rw-r--r--src/core/job.h5
-rw-r--r--src/core/kmod-setup.h5
-rw-r--r--src/core/load-dropin.h5
-rw-r--r--src/core/load-fragment.h5
-rw-r--r--src/core/locale-setup.h5
-rw-r--r--src/core/loopback-setup.h5
-rw-r--r--src/core/machine-id-setup.h5
-rw-r--r--src/core/manager.h5
-rw-r--r--src/core/mount-setup.h5
-rw-r--r--src/core/mount.h5
-rw-r--r--src/core/namespace.h5
-rw-r--r--src/core/path.h5
-rw-r--r--src/core/selinux-setup.h5
-rw-r--r--src/core/service.h5
-rw-r--r--src/core/snapshot.h5
-rw-r--r--src/core/socket.h5
-rw-r--r--src/core/special.h5
-rw-r--r--src/core/swap.h5
-rw-r--r--src/core/sysfs-show.h5
-rw-r--r--src/core/target.h5
-rw-r--r--src/core/tcpwrap.h5
-rw-r--r--src/core/timer.h5
-rw-r--r--src/core/umount.h5
-rw-r--r--src/core/unit.h5
50 files changed, 50 insertions, 200 deletions
diff --git a/src/core/automount.h b/src/core/automount.h
index 5704502ef..3d5736d1c 100644
--- a/src/core/automount.h
+++ b/src/core/automount.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooautomounthfoo
-#define fooautomounthfoo
+#pragma once
/***
This file is part of systemd.
@@ -72,5 +71,3 @@ AutomountState automount_state_from_string(const char *s);
const char* automount_result_to_string(AutomountResult i);
AutomountResult automount_result_from_string(const char *s);
-
-#endif
diff --git a/src/core/build.h b/src/core/build.h
index 4ccfab136..0b38050bd 100644
--- a/src/core/build.h
+++ b/src/core/build.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foobuildhfoo
-#define foobuildhfoo
+#pragma once
/***
This file is part of systemd.
@@ -65,5 +64,3 @@
#endif
#define SYSTEMD_FEATURES _PAM_FEATURE_ " " _LIBWRAP_FEATURE_ " " _AUDIT_FEATURE_ " " _SELINUX_FEATURE_ " " _IMA_FEATURE_ " " _SYSVINIT_FEATURE_ " " _LIBCRYPTSETUP_FEATURE_
-
-#endif
diff --git a/src/core/bus-errors.h b/src/core/bus-errors.h
index a6f055f09..04c1b2849 100644
--- a/src/core/bus-errors.h
+++ b/src/core/bus-errors.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foobuserrorshfoo
-#define foobuserrorshfoo
+#pragma once
/***
This file is part of systemd.
@@ -54,5 +53,3 @@ static inline const char *bus_error(const DBusError *e, int r) {
return strerror(-r);
}
-
-#endif
diff --git a/src/core/cgroup-attr.h b/src/core/cgroup-attr.h
index 2b3c1aea9..2b754eac4 100644
--- a/src/core/cgroup-attr.h
+++ b/src/core/cgroup-attr.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foocgroupattrhfoo
-#define foocgroupattrhfoo
+#pragma once
/***
This file is part of systemd.
@@ -45,5 +44,3 @@ int cgroup_attribute_apply_list(CGroupAttribute *first, CGroupBonding *b);
CGroupAttribute *cgroup_attribute_find_list(CGroupAttribute *first, const char *controller, const char *name);
void cgroup_attribute_free_list(CGroupAttribute *first);
-
-#endif
diff --git a/src/core/cgroup.h b/src/core/cgroup.h
index 65fbe4da8..229da52ba 100644
--- a/src/core/cgroup.h
+++ b/src/core/cgroup.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foocgrouphfoo
-#define foocgrouphfoo
+#pragma once
/***
This file is part of systemd.
@@ -90,5 +89,3 @@ int cgroup_bonding_get(Manager *m, const char *cgroup, CGroupBonding **bonding);
int cgroup_notify_empty(Manager *m, const char *group);
Unit* cgroup_unit_by_pid(Manager *m, pid_t pid);
-
-#endif
diff --git a/src/core/condition.h b/src/core/condition.h
index 2d1f2cd17..3dca432f7 100644
--- a/src/core/condition.h
+++ b/src/core/condition.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooconditionhfoo
-#define fooconditionhfoo
+#pragma once
/***
This file is part of systemd.
@@ -66,5 +65,3 @@ void condition_dump_list(Condition *c, FILE *f, const char *prefix);
const char* condition_type_to_string(ConditionType t);
int condition_type_from_string(const char *s);
-
-#endif
diff --git a/src/core/dbus-automount.h b/src/core/dbus-automount.h
index 6849244b4..b338e25fc 100644
--- a/src/core/dbus-automount.h
+++ b/src/core/dbus-automount.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbusautomounthfoo
-#define foodbusautomounthfoo
+#pragma once
/***
This file is part of systemd.
@@ -30,5 +29,3 @@ DBusHandlerResult bus_automount_message_handler(Unit *u, DBusConnection *c, DBus
extern const char bus_automount_interface[];
extern const char bus_automount_invalidating_properties[];
-
-#endif
diff --git a/src/core/dbus-device.h b/src/core/dbus-device.h
index 068adee5b..311e0685d 100644
--- a/src/core/dbus-device.h
+++ b/src/core/dbus-device.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbusdevicehfoo
-#define foodbusdevicehfoo
+#pragma once
/***
This file is part of systemd.
@@ -30,5 +29,3 @@ DBusHandlerResult bus_device_message_handler(Unit *u, DBusConnection *c, DBusMes
extern const char bus_device_interface[];
extern const char bus_device_invalidating_properties[];
-
-#endif
diff --git a/src/core/dbus-execute.h b/src/core/dbus-execute.h
index dc267e6cc..feb883335 100644
--- a/src/core/dbus-execute.h
+++ b/src/core/dbus-execute.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbusexecutehfoo
-#define foodbusexecutehfoo
+#pragma once
/***
This file is part of systemd.
@@ -124,5 +123,3 @@ int bus_execute_append_command(DBusMessageIter *u, const char *property, void *d
int bus_execute_append_kill_mode(DBusMessageIter *i, const char *property, void *data);
int bus_execute_append_env_files(DBusMessageIter *i, const char *property, void *data);
int bus_execute_append_syscall_filter(DBusMessageIter *i, const char *property, void *data);
-
-#endif
diff --git a/src/core/dbus-job.h b/src/core/dbus-job.h
index 1ee0a4279..a1b928fb1 100644
--- a/src/core/dbus-job.h
+++ b/src/core/dbus-job.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbusjobhfoo
-#define foodbusjobhfoo
+#pragma once
/***
This file is part of systemd.
@@ -32,5 +31,3 @@ void bus_job_send_removed_signal(Job *j);
extern const DBusObjectPathVTable bus_job_vtable;
extern const char bus_job_interface[];
-
-#endif
diff --git a/src/core/dbus-manager.h b/src/core/dbus-manager.h
index 0563b324f..f0dce5a2e 100644
--- a/src/core/dbus-manager.h
+++ b/src/core/dbus-manager.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbusmanagerhfoo
-#define foodbusmanagerhfoo
+#pragma once
/***
This file is part of systemd.
@@ -27,5 +26,3 @@
extern const DBusObjectPathVTable bus_manager_vtable;
extern const char bus_manager_interface[];
-
-#endif
diff --git a/src/core/dbus-mount.h b/src/core/dbus-mount.h
index 097421396..859739437 100644
--- a/src/core/dbus-mount.h
+++ b/src/core/dbus-mount.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbusmounthfoo
-#define foodbusmounthfoo
+#pragma once
/***
This file is part of systemd.
@@ -30,5 +29,3 @@ DBusHandlerResult bus_mount_message_handler(Unit *u, DBusConnection *c, DBusMess
extern const char bus_mount_interface[];
extern const char bus_mount_invalidating_properties[];
-
-#endif
diff --git a/src/core/dbus-path.h b/src/core/dbus-path.h
index db2d5b916..c945f7d58 100644
--- a/src/core/dbus-path.h
+++ b/src/core/dbus-path.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbuspathhfoo
-#define foodbuspathhfoo
+#pragma once
/***
This file is part of systemd.
@@ -31,5 +30,3 @@ DBusHandlerResult bus_path_message_handler(Unit *u, DBusConnection *c, DBusMessa
extern const char bus_path_interface[];
extern const char bus_path_invalidating_properties[];
-
-#endif
diff --git a/src/core/dbus-service.h b/src/core/dbus-service.h
index 27f65f5c9..143aed7ae 100644
--- a/src/core/dbus-service.h
+++ b/src/core/dbus-service.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbusservicehfoo
-#define foodbusservicehfoo
+#pragma once
/***
This file is part of systemd.
@@ -30,5 +29,3 @@ DBusHandlerResult bus_service_message_handler(Unit *u, DBusConnection *c, DBusMe
extern const char bus_service_interface[];
extern const char bus_service_invalidating_properties[];
-
-#endif
diff --git a/src/core/dbus-snapshot.h b/src/core/dbus-snapshot.h
index fea13872a..1208aafff 100644
--- a/src/core/dbus-snapshot.h
+++ b/src/core/dbus-snapshot.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbussnapshothfoo
-#define foodbussnapshothfoo
+#pragma once
/***
This file is part of systemd.
@@ -29,5 +28,3 @@
DBusHandlerResult bus_snapshot_message_handler(Unit *u, DBusConnection *c, DBusMessage *message);
extern const char bus_snapshot_interface[];
-
-#endif
diff --git a/src/core/dbus-socket.h b/src/core/dbus-socket.h
index eafb3af6b..5369b22e5 100644
--- a/src/core/dbus-socket.h
+++ b/src/core/dbus-socket.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbussockethfoo
-#define foodbussockethfoo
+#pragma once
/***
This file is part of systemd.
@@ -30,5 +29,3 @@ DBusHandlerResult bus_socket_message_handler(Unit *u, DBusConnection *c, DBusMes
extern const char bus_socket_interface[];
extern const char bus_socket_invalidating_properties[];
-
-#endif
diff --git a/src/core/dbus-swap.h b/src/core/dbus-swap.h
index 196756534..41fe4447f 100644
--- a/src/core/dbus-swap.h
+++ b/src/core/dbus-swap.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbusswaphfoo
-#define foodbusswaphfoo
+#pragma once
/***
This file is part of systemd.
@@ -31,5 +30,3 @@ DBusHandlerResult bus_swap_message_handler(Unit *u, DBusConnection *c, DBusMessa
extern const char bus_swap_interface[];
extern const char bus_swap_invalidating_properties[];
-
-#endif
diff --git a/src/core/dbus-target.h b/src/core/dbus-target.h
index f11cec7d2..a8a0304c7 100644
--- a/src/core/dbus-target.h
+++ b/src/core/dbus-target.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbustargethfoo
-#define foodbustargethfoo
+#pragma once
/***
This file is part of systemd.
@@ -29,5 +28,3 @@
DBusHandlerResult bus_target_message_handler(Unit *u, DBusConnection *c, DBusMessage *message);
extern const char bus_target_interface[];
-
-#endif
diff --git a/src/core/dbus-timer.h b/src/core/dbus-timer.h
index daa26c851..9ac30501d 100644
--- a/src/core/dbus-timer.h
+++ b/src/core/dbus-timer.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbustimerhfoo
-#define foodbustimerhfoo
+#pragma once
/***
This file is part of systemd.
@@ -30,5 +29,3 @@ DBusHandlerResult bus_timer_message_handler(Unit *u, DBusConnection *c, DBusMess
extern const char bus_timer_interface[];
extern const char bus_timer_invalidating_properties[];
-
-#endif
diff --git a/src/core/dbus-unit.h b/src/core/dbus-unit.h
index d5902ee22..5a3a9be53 100644
--- a/src/core/dbus-unit.h
+++ b/src/core/dbus-unit.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbusunithfoo
-#define foodbusunithfoo
+#pragma once
/***
This file is part of systemd.
@@ -138,5 +137,3 @@ void bus_unit_send_removed_signal(Unit *u);
extern const DBusObjectPathVTable bus_unit_vtable;
extern const char bus_unit_interface[];
-
-#endif
diff --git a/src/core/dbus.h b/src/core/dbus.h
index ed0b1c7ce..0502d7c25 100644
--- a/src/core/dbus.h
+++ b/src/core/dbus.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbushfoo
-#define foodbushfoo
+#pragma once
/***
This file is part of systemd.
@@ -49,5 +48,3 @@ void bus_broadcast_finished(Manager *m, usec_t kernel_usec, usec_t initrd_usec,
#define BUS_PENDING_CALL_NAME(m, p) dbus_pending_call_get_data((p), (m)->name_data_slot)
extern const char * const bus_interface_table[];
-
-#endif
diff --git a/src/core/device.h b/src/core/device.h
index fa806575c..3c4604f60 100644
--- a/src/core/device.h
+++ b/src/core/device.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodevicehfoo
-#define foodevicehfoo
+#pragma once
/***
This file is part of systemd.
@@ -55,5 +54,3 @@ void device_fd_event(Manager *m, int events);
const char* device_state_to_string(DeviceState i);
DeviceState device_state_from_string(const char *s);
-
-#endif
diff --git a/src/core/execute.h b/src/core/execute.h
index 187165cdc..09f246e16 100644
--- a/src/core/execute.h
+++ b/src/core/execute.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooexecutehfoo
-#define fooexecutehfoo
+#pragma once
/***
This file is part of systemd.
@@ -235,5 +234,3 @@ KillMode kill_mode_from_string(const char *s);
const char *kill_who_to_string(KillWho k);
KillWho kill_who_from_string(const char *s);
-
-#endif
diff --git a/src/core/fdset.h b/src/core/fdset.h
index bb5817243..c3e408c8a 100644
--- a/src/core/fdset.h
+++ b/src/core/fdset.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foofdsethfoo
-#define foofdsethfoo
+#pragma once
/***
This file is part of systemd.
@@ -36,5 +35,3 @@ int fdset_remove(FDSet *s, int fd);
int fdset_new_fill(FDSet **_s);
int fdset_cloexec(FDSet *fds, bool b);
-
-#endif
diff --git a/src/core/hostname-setup.h b/src/core/hostname-setup.h
index 9550b8c5a..8dc3a9e1d 100644
--- a/src/core/hostname-setup.h
+++ b/src/core/hostname-setup.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foohostnamesetuphfoo
-#define foohostnamesetuphfoo
+#pragma once
/***
This file is part of systemd.
@@ -23,5 +22,3 @@
***/
int hostname_setup(void);
-
-#endif
diff --git a/src/core/ima-setup.h b/src/core/ima-setup.h
index 8de64bfdb..14b56d1fc 100644
--- a/src/core/ima-setup.h
+++ b/src/core/ima-setup.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooimasetuphfoo
-#define fooimasetuphfoo
+#pragma once
/***
This file is part of systemd.
@@ -25,5 +24,3 @@
***/
int ima_setup(void);
-
-#endif
diff --git a/src/core/job.h b/src/core/job.h
index 3208e6c65..349fb687c 100644
--- a/src/core/job.h
+++ b/src/core/job.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foojobhfoo
-#define foojobhfoo
+#pragma once
/***
This file is part of systemd.
@@ -229,5 +228,3 @@ JobMode job_mode_from_string(const char *s);
const char* job_result_to_string(JobResult t);
JobResult job_result_from_string(const char *s);
-
-#endif
diff --git a/src/core/kmod-setup.h b/src/core/kmod-setup.h
index faaaa9ab4..24dcdddfa 100644
--- a/src/core/kmod-setup.h
+++ b/src/core/kmod-setup.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fookmodsetuphfoo
-#define fookmodsetuphfoo
+#pragma once
/***
This file is part of systemd.
@@ -23,5 +22,3 @@
***/
int kmod_setup(void);
-
-#endif
diff --git a/src/core/load-dropin.h b/src/core/load-dropin.h
index 0b613c53f..1d2fafeee 100644
--- a/src/core/load-dropin.h
+++ b/src/core/load-dropin.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooloaddropinhfoo
-#define fooloaddropinhfoo
+#pragma once
/***
This file is part of systemd.
@@ -27,5 +26,3 @@
/* Read service data supplementary drop-in directories */
int unit_load_dropin(Unit *u);
-
-#endif
diff --git a/src/core/load-fragment.h b/src/core/load-fragment.h
index 543e32968..24f738464 100644
--- a/src/core/load-fragment.h
+++ b/src/core/load-fragment.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooloadfragmenthfoo
-#define fooloadfragmenthfoo
+#pragma once
/***
This file is part of systemd.
@@ -87,5 +86,3 @@ int config_parse_syscall_filter(const char *filename, unsigned line, const char
/* gperf prototypes */
const struct ConfigPerfItem* load_fragment_gperf_lookup(const char *key, unsigned length);
extern const char load_fragment_gperf_nulstr[];
-
-#endif
diff --git a/src/core/locale-setup.h b/src/core/locale-setup.h
index 418fdfae1..5a0f2f788 100644
--- a/src/core/locale-setup.h
+++ b/src/core/locale-setup.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foolocalesetuphfoo
-#define foolocalesetuphfoo
+#pragma once
/***
This file is part of systemd.
@@ -23,5 +22,3 @@
***/
int locale_setup(void);
-
-#endif
diff --git a/src/core/loopback-setup.h b/src/core/loopback-setup.h
index cbb969e1e..dd83cf13a 100644
--- a/src/core/loopback-setup.h
+++ b/src/core/loopback-setup.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooloopbacksetuphfoo
-#define fooloopbacksetuphfoo
+#pragma once
/***
This file is part of systemd.
@@ -23,5 +22,3 @@
***/
int loopback_setup(void);
-
-#endif
diff --git a/src/core/machine-id-setup.h b/src/core/machine-id-setup.h
index 16f45d86d..b9e6b4d67 100644
--- a/src/core/machine-id-setup.h
+++ b/src/core/machine-id-setup.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foomachineidsetuphfoo
-#define foomachineidsetuphfoo
+#pragma once
/***
This file is part of systemd.
@@ -23,5 +22,3 @@
***/
int machine_id_setup(void);
-
-#endif
diff --git a/src/core/manager.h b/src/core/manager.h
index 6c81f92d6..603c2dc31 100644
--- a/src/core/manager.h
+++ b/src/core/manager.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foomanagerhfoo
-#define foomanagerhfoo
+#pragma once
/***
This file is part of systemd.
@@ -304,5 +303,3 @@ bool manager_get_show_status(Manager *m);
const char *manager_running_as_to_string(ManagerRunningAs i);
ManagerRunningAs manager_running_as_from_string(const char *s);
-
-#endif
diff --git a/src/core/mount-setup.h b/src/core/mount-setup.h
index 720b66f76..4b521ad0e 100644
--- a/src/core/mount-setup.h
+++ b/src/core/mount-setup.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foomountsetuphfoo
-#define foomountsetuphfoo
+#pragma once
/***
This file is part of systemd.
@@ -32,5 +31,3 @@ int mount_cgroup_controllers(char ***join_controllers);
bool mount_point_is_api(const char *path);
bool mount_point_ignore(const char *path);
-
-#endif
diff --git a/src/core/mount.h b/src/core/mount.h
index ad9efc34d..9583eebe3 100644
--- a/src/core/mount.h
+++ b/src/core/mount.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foomounthfoo
-#define foomounthfoo
+#pragma once
/***
This file is part of systemd.
@@ -118,5 +117,3 @@ MountExecCommand mount_exec_command_from_string(const char *s);
const char* mount_result_to_string(MountResult i);
MountResult mount_result_from_string(const char *s);
-
-#endif
diff --git a/src/core/namespace.h b/src/core/namespace.h
index eb912e9e2..5d72ed91f 100644
--- a/src/core/namespace.h
+++ b/src/core/namespace.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foonamespacehfoo
-#define foonamespacehfoo
+#pragma once
/***
This file is part of systemd.
@@ -30,5 +29,3 @@ int setup_namespace(
char **inaccessible,
bool private_tmp,
unsigned long flags);
-
-#endif
diff --git a/src/core/path.h b/src/core/path.h
index 1b4d0d49d..77926888a 100644
--- a/src/core/path.h
+++ b/src/core/path.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foopathhfoo
-#define foopathhfoo
+#pragma once
/***
This file is part of systemd.
@@ -109,5 +108,3 @@ PathType path_type_from_string(const char *s);
const char* path_result_to_string(PathResult i);
PathResult path_result_from_string(const char *s);
-
-#endif
diff --git a/src/core/selinux-setup.h b/src/core/selinux-setup.h
index e9a45f589..39e2bc25b 100644
--- a/src/core/selinux-setup.h
+++ b/src/core/selinux-setup.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooselinuxsetuphfoo
-#define fooselinuxsetuphfoo
+#pragma once
/***
This file is part of systemd.
@@ -25,5 +24,3 @@
#include <stdbool.h>
int selinux_setup(bool *loaded_policy);
-
-#endif
diff --git a/src/core/service.h b/src/core/service.h
index 4a7287d82..5ad09d0ac 100644
--- a/src/core/service.h
+++ b/src/core/service.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooservicehfoo
-#define fooservicehfoo
+#pragma once
/***
This file is part of systemd.
@@ -216,5 +215,3 @@ ServiceResult service_result_from_string(const char *s);
const char* start_limit_action_to_string(StartLimitAction i);
StartLimitAction start_limit_action_from_string(const char *s);
-
-#endif
diff --git a/src/core/snapshot.h b/src/core/snapshot.h
index 9c6321642..9662d9316 100644
--- a/src/core/snapshot.h
+++ b/src/core/snapshot.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foosnapshothfoo
-#define foosnapshothfoo
+#pragma once
/***
This file is part of systemd.
@@ -49,5 +48,3 @@ void snapshot_remove(Snapshot *s);
const char* snapshot_state_to_string(SnapshotState i);
SnapshotState snapshot_state_from_string(const char *s);
-
-#endif
diff --git a/src/core/socket.h b/src/core/socket.h
index 576506fef..508f00eb3 100644
--- a/src/core/socket.h
+++ b/src/core/socket.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foosockethfoo
-#define foosockethfoo
+#pragma once
/***
This file is part of systemd.
@@ -169,5 +168,3 @@ SocketExecCommand socket_exec_command_from_string(const char *s);
const char* socket_result_to_string(SocketResult i);
SocketResult socket_result_from_string(const char *s);
-
-#endif
diff --git a/src/core/special.h b/src/core/special.h
index f71f07675..e3004a518 100644
--- a/src/core/special.h
+++ b/src/core/special.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foospecialhfoo
-#define foospecialhfoo
+#pragma once
/***
This file is part of systemd.
@@ -86,5 +85,3 @@
#define SPECIAL_RUNLEVEL3_TARGET "runlevel3.target"
#define SPECIAL_RUNLEVEL4_TARGET "runlevel4.target"
#define SPECIAL_RUNLEVEL5_TARGET "runlevel5.target"
-
-#endif
diff --git a/src/core/swap.h b/src/core/swap.h
index ff12169b6..d8888e176 100644
--- a/src/core/swap.h
+++ b/src/core/swap.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooswaphfoo
-#define fooswaphfoo
+#pragma once
/***
This file is part of systemd.
@@ -119,5 +118,3 @@ SwapExecCommand swap_exec_command_from_string(const char *s);
const char* swap_result_to_string(SwapResult i);
SwapResult swap_result_from_string(const char *s);
-
-#endif
diff --git a/src/core/sysfs-show.h b/src/core/sysfs-show.h
index 51d73fb15..9ffd129c4 100644
--- a/src/core/sysfs-show.h
+++ b/src/core/sysfs-show.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foosysfsshowhfoo
-#define foosysfsshowhfoo
+#pragma once
/***
This file is part of systemd.
@@ -23,5 +22,3 @@
***/
int show_sysfs(const char *seat, const char *prefix, unsigned columns);
-
-#endif
diff --git a/src/core/target.h b/src/core/target.h
index 62bc34382..1676553ad 100644
--- a/src/core/target.h
+++ b/src/core/target.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef footargethfoo
-#define footargethfoo
+#pragma once
/***
This file is part of systemd.
@@ -43,5 +42,3 @@ extern const UnitVTable target_vtable;
const char* target_state_to_string(TargetState i);
TargetState target_state_from_string(const char *s);
-
-#endif
diff --git a/src/core/tcpwrap.h b/src/core/tcpwrap.h
index 0c87b111e..3353b6596 100644
--- a/src/core/tcpwrap.h
+++ b/src/core/tcpwrap.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foolibwraphfoo
-#define foolibwraphfoo
+#pragma once
/***
This file is part of systemd.
@@ -25,5 +24,3 @@
#include <stdbool.h>
bool socket_tcpwrap(int fd, const char *name);
-
-#endif
diff --git a/src/core/timer.h b/src/core/timer.h
index 985b460ab..c6d1d42e4 100644
--- a/src/core/timer.h
+++ b/src/core/timer.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef footimerhfoo
-#define footimerhfoo
+#pragma once
/***
This file is part of systemd.
@@ -89,5 +88,3 @@ TimerBase timer_base_from_string(const char *s);
const char* timer_result_to_string(TimerResult i);
TimerResult timer_result_from_string(const char *s);
-
-#endif
diff --git a/src/core/umount.h b/src/core/umount.h
index 2e2f9c181..8439ffe58 100644
--- a/src/core/umount.h
+++ b/src/core/umount.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooumounthfoo
-#define fooumounthfoo
+#pragma once
/***
This file is part of systemd.
@@ -29,5 +28,3 @@ int swapoff_all(bool *changed);
int loopback_detach_all(bool *changed);
int dm_detach_all(bool *changed);
-
-#endif
diff --git a/src/core/unit.h b/src/core/unit.h
index d0a5d641d..635293ffb 100644
--- a/src/core/unit.h
+++ b/src/core/unit.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foounithfoo
-#define foounithfoo
+#pragma once
/***
This file is part of systemd.
@@ -544,5 +543,3 @@ UnitActiveState unit_active_state_from_string(const char *s);
const char *unit_dependency_to_string(UnitDependency i);
UnitDependency unit_dependency_from_string(const char *s);
-
-#endif