summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Landden <shawn@churchofgit.com>2013-11-18 16:58:43 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-11-19 02:28:54 +0100
commit05d3a176239c1dd67863c70a5b79d9bc14144ef6 (patch)
treeea288f8cd73c1cb071941e15427a6044f4d0c230
parentremove unused variables (diff)
downloadsystemd-05d3a176239c1dd67863c70a5b79d9bc14144ef6.tar.xz
systemd-05d3a176239c1dd67863c70a5b79d9bc14144ef6.zip
use #pragma once instead of foo*foo define guards
-rw-r--r--src/core/killall.h5
-rw-r--r--src/core/switch-root.h5
-rw-r--r--src/core/syscall-list.h5
-rw-r--r--src/core/transaction.h5
-rw-r--r--src/login/logind-action.h5
-rw-r--r--src/login/logind-button.h5
-rw-r--r--src/login/logind-inhibit.h5
-rw-r--r--src/nss-myhostname/ifconf.h9
-rw-r--r--src/shared/audit.h5
-rw-r--r--src/shared/capability.h5
-rw-r--r--src/shared/cgroup-show.h5
-rw-r--r--src/shared/conf-files.h5
-rw-r--r--src/shared/hwclock.h5
-rw-r--r--src/shared/spawn-polkit-agent.h5
14 files changed, 15 insertions, 59 deletions
diff --git a/src/core/killall.h b/src/core/killall.h
index d08ac142f0..95b110fae1 100644
--- a/src/core/killall.h
+++ b/src/core/killall.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fookillallhfoo
-#define fookillallhfoo
+#pragma once
/***
This file is part of systemd.
@@ -23,5 +22,3 @@
***/
void broadcast_signal(int sig, bool wait);
-
-#endif
diff --git a/src/core/switch-root.h b/src/core/switch-root.h
index 0c4cd1e403..ab493b5fb1 100644
--- a/src/core/switch-root.h
+++ b/src/core/switch-root.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooswitchroothfoo
-#define fooswitchroothfoo
+#pragma once
/***
This file is part of systemd.
@@ -23,5 +22,3 @@
***/
int switch_root(const char *switch_root);
-
-#endif
diff --git a/src/core/syscall-list.h b/src/core/syscall-list.h
index 6bb4d91f91..37efc5681d 100644
--- a/src/core/syscall-list.h
+++ b/src/core/syscall-list.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foosyscalllisthfoo
-#define foosyscalllisthfoo
+#pragma once
/***
This file is part of systemd.
@@ -40,5 +39,3 @@ const char *syscall_to_name(int id);
int syscall_from_name(const char *name);
int syscall_max(void);
-
-#endif
diff --git a/src/core/transaction.h b/src/core/transaction.h
index 12f9194927..b6ee237ef8 100644
--- a/src/core/transaction.h
+++ b/src/core/transaction.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef footransactionhfoo
-#define footransactionhfoo
+#pragma once
/***
This file is part of systemd.
@@ -53,5 +52,3 @@ int transaction_add_job_and_dependencies(
int transaction_activate(Transaction *tr, Manager *m, JobMode mode, DBusError *e);
int transaction_add_isolate_jobs(Transaction *tr, Manager *m);
void transaction_abort(Transaction *tr);
-
-#endif
diff --git a/src/login/logind-action.h b/src/login/logind-action.h
index 552713637d..74f71441f9 100644
--- a/src/login/logind-action.h
+++ b/src/login/logind-action.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foologindactionhfoo
-#define foologindactionhfoo
+#pragma once
/***
This file is part of systemd.
@@ -50,5 +49,3 @@ const char* handle_action_to_string(HandleAction h) _const_;
HandleAction handle_action_from_string(const char *s) _pure_;
int config_parse_handle_action(const char *unit, const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
-
-#endif
diff --git a/src/login/logind-button.h b/src/login/logind-button.h
index 83bf1fc70c..824106cd24 100644
--- a/src/login/logind-button.h
+++ b/src/login/logind-button.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foologindbuttonhfoo
-#define foologindbuttonhfoo
+#pragma once
/***
This file is part of systemd.
@@ -45,5 +44,3 @@ void button_free(Button*b);
int button_open(Button *b);
int button_recheck(Button *b);
int button_set_seat(Button *b, const char *sn);
-
-#endif
diff --git a/src/login/logind-inhibit.h b/src/login/logind-inhibit.h
index ed3b2ebcc3..da3d7e736e 100644
--- a/src/login/logind-inhibit.h
+++ b/src/login/logind-inhibit.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foologindinhibithfoo
-#define foologindinhibithfoo
+#pragma once
/***
This file is part of systemd.
@@ -93,5 +92,3 @@ InhibitWhat inhibit_what_from_string(const char *s);
const char *inhibit_mode_to_string(InhibitMode k);
InhibitMode inhibit_mode_from_string(const char *s);
-
-#endif
diff --git a/src/nss-myhostname/ifconf.h b/src/nss-myhostname/ifconf.h
index 2764a0aa0f..cd598d2b43 100644
--- a/src/nss-myhostname/ifconf.h
+++ b/src/nss-myhostname/ifconf.h
@@ -1,9 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooifconfhfoo
-#define fooifconfhfoo
-
-#include <sys/socket.h>
+#pragma once
/***
This file is part of systemd.
@@ -27,6 +24,7 @@
#include <inttypes.h>
#include <sys/types.h>
#include <assert.h>
+#include <sys/socket.h>
struct address {
unsigned char family;
@@ -68,6 +66,3 @@ static inline int address_compare(const void *_a, const void *_b) {
return 0;
}
-
-
-#endif
diff --git a/src/shared/audit.h b/src/shared/audit.h
index 490a0b0320..0effc0baa0 100644
--- a/src/shared/audit.h
+++ b/src/shared/audit.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooaudithfoo
-#define fooaudithfoo
+#pragma once
/***
This file is part of systemd.
@@ -28,5 +27,3 @@
int audit_session_from_pid(pid_t pid, uint32_t *id);
int audit_loginuid_from_pid(pid_t pid, uid_t *uid);
-
-#endif
diff --git a/src/shared/capability.h b/src/shared/capability.h
index 6cb31bb510..59469e56cb 100644
--- a/src/shared/capability.h
+++ b/src/shared/capability.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foocapabilityhfoo
-#define foocapabilityhfoo
+#pragma once
/***
This file is part of systemd.
@@ -29,5 +28,3 @@ unsigned long cap_last_cap(void);
int have_effective_cap(int value);
int capability_bounding_set_drop(uint64_t drop, bool right_now);
int capability_bounding_set_drop_usermode(uint64_t drop);
-
-#endif
diff --git a/src/shared/cgroup-show.h b/src/shared/cgroup-show.h
index 72bc8a650f..3146f56cad 100644
--- a/src/shared/cgroup-show.h
+++ b/src/shared/cgroup-show.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foocgroupshowhfoo
-#define foocgroupshowhfoo
+#pragma once
/***
This file is part of systemd.
@@ -32,5 +31,3 @@ int show_cgroup(const char *controller, const char *path, const char *prefix, un
int show_cgroup_and_extra_by_spec(const char *spec, const char *prefix, unsigned n_columns, bool kernel_threads, const pid_t extra_pids[], unsigned n_extra_pids, OutputFlags flags);
int show_cgroup_and_extra(const char *controller, const char *path, const char *prefix, unsigned n_columns, bool kernel_threads, const pid_t extra_pids[], unsigned n_extra_pids, OutputFlags flags);
-
-#endif
diff --git a/src/shared/conf-files.h b/src/shared/conf-files.h
index 3bd3d2f3d4..368c112eb3 100644
--- a/src/shared/conf-files.h
+++ b/src/shared/conf-files.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooconffileshfoo
-#define fooconffileshfoo
+#pragma once
/***
This file is part of systemd.
@@ -28,5 +27,3 @@
int conf_files_list(char ***strv, const char *suffix, const char *root, const char *dir, ...);
int conf_files_list_strv(char ***strv, const char *suffix, const char *root, const char* const* dirs);
int conf_files_list_nulstr(char ***strv, const char *suffix, const char *root, const char *dirs);
-
-#endif
diff --git a/src/shared/hwclock.h b/src/shared/hwclock.h
index b2bdc78f0c..4330b8ea87 100644
--- a/src/shared/hwclock.h
+++ b/src/shared/hwclock.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foohwclockhfoo
-#define foohwclockhfoo
+#pragma once
/***
This file is part of systemd.
@@ -27,5 +26,3 @@ int hwclock_set_timezone(int *min);
int hwclock_reset_timezone(void);
int hwclock_get_time(struct tm *tm);
int hwclock_set_time(const struct tm *tm);
-
-#endif
diff --git a/src/shared/spawn-polkit-agent.h b/src/shared/spawn-polkit-agent.h
index b91d20f120..c3bc1b845e 100644
--- a/src/shared/spawn-polkit-agent.h
+++ b/src/shared/spawn-polkit-agent.h
@@ -1,7 +1,6 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foospawnpolkitagenthfoo
-#define foospawnpolkitagenthfoo
+#pragma once
/***
This file is part of systemd.
@@ -24,5 +23,3 @@
int polkit_agent_open(void);
void polkit_agent_close(void);
-
-#endif