[CRIU] [PATCH] use #pragma once instead of #define guards

Shawn Landden shawn at churchofgit.com
Fri Dec 20 19:20:46 PST 2013


---
 include/bug.h              | 5 +----
 include/compiler.h         | 5 +----
 include/cpu.h              | 5 +----
 include/cr-service.h       | 5 +----
 include/cr-show.h          | 5 +----
 include/cr_options.h       | 5 +----
 include/crtools.h          | 5 +----
 include/err.h              | 5 +----
 include/errno.h            | 5 +----
 include/eventfd.h          | 5 +----
 include/eventpoll.h        | 5 +----
 include/fcntl.h            | 5 +----
 include/fdset.h            | 5 +----
 include/fifo.h             | 5 +----
 include/file-ids.h         | 5 +----
 include/file-lock.h        | 5 +----
 include/files-reg.h        | 5 +----
 include/files.h            | 5 +----
 include/fsnotify.h         | 5 +----
 include/image-desc.h       | 5 +----
 include/image.h            | 5 +----
 include/inet_diag.h        | 5 +----
 include/ipc_ns.h           | 5 +----
 include/kcmp-ids.h         | 5 +----
 include/kcmp.h             | 5 +----
 include/kerndat.h          | 5 +----
 include/libnetlink.h       | 6 +-----
 include/list.h             | 5 +----
 include/lock.h             | 5 +----
 include/log-levels.h       | 5 +----
 include/log.h              | 5 +----
 include/magic.h            | 5 +----
 include/mem.h              | 5 +----
 include/mman.h             | 5 +----
 include/mount.h            | 5 +----
 include/namespaces.h       | 5 +----
 include/net.h              | 5 +----
 include/netfilter.h        | 5 +----
 include/netlink_diag.h     | 5 +----
 include/packet_diag.h      | 5 +----
 include/page-pipe.h        | 5 +----
 include/page-read.h        | 5 +----
 include/page-xfer.h        | 5 +----
 include/parasite-syscall.h | 5 +----
 include/parasite.h         | 5 +----
 include/pid.h              | 5 +----
 include/pipes.h            | 5 +----
 include/posix-timer.h      | 5 +----
 include/prctl.h            | 5 +----
 include/proc_parse.h       | 5 +----
 include/protobuf-desc.h    | 5 +----
 include/protobuf.h         | 5 +----
 include/pstree.h           | 5 +----
 include/ptrace.h           | 5 +----
 include/rbtree.h           | 5 +----
 include/restorer.h         | 5 +----
 include/rst-malloc.h       | 5 +----
 include/servicefd.h        | 5 +----
 include/shmem.h            | 5 +----
 include/signalfd.h         | 5 +----
 include/sk-inet.h          | 5 +----
 include/sk-packet.h        | 5 +----
 include/sk-queue.h         | 5 +----
 include/sockets.h          | 5 +----
 include/stats.h            | 5 +----
 include/string.h           | 5 +----
 include/syscall-types.h    | 5 +----
 include/sysctl.h           | 5 +----
 include/tty.h              | 5 +----
 include/tun.h              | 5 +----
 include/unix_diag.h        | 5 +----
 include/util-pie.h         | 5 +----
 include/util.h             | 5 +----
 include/uts_ns.h           | 5 +----
 include/vdso.h             | 5 +----
 include/vma.h              | 5 +----
 include/xmalloc.h          | 5 +----
 77 files changed, 77 insertions(+), 309 deletions(-)

diff --git a/include/bug.h b/include/bug.h
index 8330fed..4565e70 100644
--- a/include/bug.h
+++ b/include/bug.h
@@ -1,5 +1,4 @@
-#ifndef __CR_BUG_H__
-#define __CR_BUG_H__
+#pragma once
 
 #include <signal.h>
 
@@ -34,5 +33,3 @@
 
 #define BUG_ON(condition)	BUG_ON_HANDLER((condition))
 #define BUG()			BUG_ON(true)
-
-#endif /* __CR_BUG_H__ */
diff --git a/include/compiler.h b/include/compiler.h
index 3f3e6d6..5a837fc 100644
--- a/include/compiler.h
+++ b/include/compiler.h
@@ -1,5 +1,4 @@
-#ifndef __CR_COMPILER_H__
-#define __CR_COMPILER_H__
+#pragma once
 
 /*
  * Various definitions for success build,
@@ -67,5 +66,3 @@
 	_max1 > _max2 ? _max1 : _max2; })
 
 #define is_log2(v)		(((v) & ((v) - 1)) == 0)
-
-#endif /* __CR_COMPILER_H__ */
diff --git a/include/cpu.h b/include/cpu.h
index 08220cf..eb54ce4 100644
--- a/include/cpu.h
+++ b/include/cpu.h
@@ -1,10 +1,7 @@
-#ifndef __CR_CPU_H__
-#define __CR_CPU_H__
+#pragma once
 
 #include "asm/cpu.h"
 
 extern void cpu_set_feature(unsigned int feature);
 extern bool cpu_has_feature(unsigned int feature);
 extern int cpu_init(void);
-
-#endif /* __CR_CPU_H__ */
diff --git a/include/cr-service.h b/include/cr-service.h
index 5c38ac3..4a3791a 100644
--- a/include/cr-service.h
+++ b/include/cr-service.h
@@ -1,5 +1,4 @@
-#ifndef __CR_SERVICE_H__
-#define __CR_SERVICE_H__
+#pragma once
 
 #include "protobuf/rpc.pb-c.h"
 
@@ -12,5 +11,3 @@ extern int send_criu_dump_resp(int socket_fd, bool success, bool restored);
 
 extern struct _cr_service_client *cr_service_client;
 extern unsigned int service_sk_ino;
-
-#endif /* __CR_SERVICE_H__ */
diff --git a/include/cr-show.h b/include/cr-show.h
index 165f87a..e206d3b 100644
--- a/include/cr-show.h
+++ b/include/cr-show.h
@@ -1,5 +1,4 @@
-#ifndef __CR_SHOW_H__
-#define __CR_SHOW_H__
+#pragma once
 
 #include <stdbool.h>
 #include "asm/types.h"
@@ -19,5 +18,3 @@ extern void ipc_msg_handler(int fd, void *obj);
 extern void ipc_sem_handler(int fd, void *obj);
 extern int cr_parse_fd(int fd, u32 magic);
 extern void show_tcp_stream(int fd, void *obj);
-
-#endif /* __CR_SHOW_H__ */
diff --git a/include/cr_options.h b/include/cr_options.h
index b90b4e1..4db07b1 100644
--- a/include/cr_options.h
+++ b/include/cr_options.h
@@ -1,5 +1,4 @@
-#ifndef __CR_OPTIONS_H__
-#define __CR_OPTIONS_H__
+#pragma once
 
 #include <stdbool.h>
 
@@ -39,5 +38,3 @@ struct cr_options {
 extern struct cr_options opts;
 
 extern void init_opts(void);
-
-#endif /* __CR_OPTIONS_H__ */
diff --git a/include/crtools.h b/include/crtools.h
index 7c08fd6..ec89d84 100644
--- a/include/crtools.h
+++ b/include/crtools.h
@@ -1,5 +1,4 @@
-#ifndef __CR_CRTOOLS_H__
-#define __CR_CRTOOLS_H__
+#pragma once
 
 #include <sys/types.h>
 
@@ -28,5 +27,3 @@ struct proc_status_creds;
 extern bool may_dump(struct proc_status_creds *);
 struct _CredsEntry;
 extern bool may_restore(struct _CredsEntry *);
-
-#endif /* __CR_CRTOOLS_H__ */
diff --git a/include/err.h b/include/err.h
index c5b6165..38f3965 100644
--- a/include/err.h
+++ b/include/err.h
@@ -1,8 +1,7 @@
 /*
  * Adopted from linux kernel
  */
-#ifndef __CR_ERR_H__
-#define __CR_ERR_H__
+#pragma once
 
 #include "compiler.h"
 
@@ -49,5 +48,3 @@ static inline int PTR_RET(const void *ptr)
 	else
 		return 0;
 }
-
-#endif /* __CR_ERR_H__ */
diff --git a/include/errno.h b/include/errno.h
index 5c2322e..f8ff9d3 100644
--- a/include/errno.h
+++ b/include/errno.h
@@ -1,9 +1,6 @@
-#ifndef __CR_ERRNO_H__
-#define __CR_ERRNO_H__
+#pragma once
 
 #define ERESTARTSYS		512
 #define ERESTARTNOINTR		513
 #define ERESTARTNOHAND		514
 #define ERESTART_RESTARTBLOCK	516
-
-#endif /* __CR_ERRNO_H__ */
diff --git a/include/eventfd.h b/include/eventfd.h
index 22a62a0..b66d677 100644
--- a/include/eventfd.h
+++ b/include/eventfd.h
@@ -1,10 +1,7 @@
-#ifndef __CR_EVENTFD_H__
-#define __CR_EVENTFD_H__
+#pragma once
 
 #include "files.h"
 
 extern int is_eventfd_link(int lfd);
 extern const struct fdtype_ops eventfd_dump_ops;
 extern struct collect_image_info eventfd_cinfo;
-
-#endif /* __CR_EVENTFD_H__ */
diff --git a/include/eventpoll.h b/include/eventpoll.h
index 4e6c112..5f4ba88 100644
--- a/include/eventpoll.h
+++ b/include/eventpoll.h
@@ -1,5 +1,4 @@
-#ifndef __CR_EVENTPOLL_H__
-#define __CR_EVENTPOLL_H__
+#pragma once
 
 #include "files.h"
 
@@ -7,5 +6,3 @@ extern int is_eventpoll_link(int lfd);
 extern const struct fdtype_ops eventpoll_dump_ops;
 extern struct collect_image_info epoll_tfd_cinfo;
 extern struct collect_image_info epoll_cinfo;
-
-#endif /* __CR_EVENTPOLL_H__ */
diff --git a/include/fcntl.h b/include/fcntl.h
index 65ba2bf..f53c387 100644
--- a/include/fcntl.h
+++ b/include/fcntl.h
@@ -1,5 +1,4 @@
-#ifndef __CR_ASM_GENERIC_FCNTL_H__
-#define __CR_ASM_GENERIC_FCNTL_H__
+#pragma once
 
 #include <sys/types.h>
 #include <fcntl.h>
@@ -28,5 +27,3 @@ struct f_owner_ex {
 #ifndef F_GETPIPE_SZ
 # define F_GETPIPE_SZ	(F_LINUX_SPECIFIC_BASE + 8)
 #endif
-
-#endif /* __CR_ASM_GENERIC_FCNTL_H__ */
diff --git a/include/fdset.h b/include/fdset.h
index ad62d5e..b5a0ce2 100644
--- a/include/fdset.h
+++ b/include/fdset.h
@@ -1,5 +1,4 @@
-#ifndef __CR_FDSET_H__
-#define __CR_FDSET_H__
+#pragma once
 
 #include "image-desc.h"
 #include "bug.h"
@@ -32,5 +31,3 @@ extern struct cr_fdset *cr_fdset_open_range(int pid, int from, int to,
 extern struct cr_fdset *cr_glob_fdset_open(int mode);
 
 extern void close_cr_fdset(struct cr_fdset **cr_fdset);
-
-#endif /* __CR_FDSET_H__ */
diff --git a/include/fifo.h b/include/fifo.h
index 1824346..edeb308 100644
--- a/include/fifo.h
+++ b/include/fifo.h
@@ -1,5 +1,4 @@
-#ifndef __CR_FIFO_H__
-#define __CR_FIFO_H__
+#pragma once
 
 struct fd_parms;
 struct cr_fdset;
@@ -7,5 +6,3 @@ struct cr_fdset;
 extern const struct fdtype_ops fifo_dump_ops;
 extern struct collect_image_info fifo_cinfo;
 extern int collect_fifo(void);
-
-#endif /* __CR_FIFO_H__ */
diff --git a/include/file-ids.h b/include/file-ids.h
index ce9029d..2d901a7 100644
--- a/include/file-ids.h
+++ b/include/file-ids.h
@@ -1,5 +1,4 @@
-#ifndef __CR_FILE_IDS_H__
-#define __CR_FILE_IDS_H__
+#pragma once
 
 #include "compiler.h"
 #include "asm/types.h"
@@ -14,5 +13,3 @@ struct fdinfo_entry;
 extern int fd_id_generate(pid_t pid, FdinfoEntry *fe);
 extern u32 fd_id_generate_special(void);
 extern void fd_id_show_tree(void);
-
-#endif /* __CR_FILE_IDS_H__ */
diff --git a/include/file-lock.h b/include/file-lock.h
index 56de975..a0ba993 100644
--- a/include/file-lock.h
+++ b/include/file-lock.h
@@ -1,5 +1,4 @@
-#ifndef __FILE_LOCK_H__
-#define __FILE_LOCK_H__
+#pragma once
 
 #include "list.h"
 
@@ -55,5 +54,3 @@ extern int dump_task_file_locks(struct parasite_ctl *ctl,
 extern int prepare_file_locks(int pid);
 
 #define OPT_FILE_LOCKS	"file-locks"
-
-#endif /* __FILE_LOCK_H__ */
diff --git a/include/files-reg.h b/include/files-reg.h
index d3bd4f0..711d734 100644
--- a/include/files-reg.h
+++ b/include/files-reg.h
@@ -1,5 +1,4 @@
-#ifndef __CR_FILES_REG_H__
-#define __CR_FILES_REG_H__
+#pragma once
 
 #include "asm/types.h"
 #include "files.h"
@@ -40,5 +39,3 @@ extern struct collect_image_info remap_cinfo;
 
 extern void delete_link_remaps(void);
 extern void free_link_remaps(void);
-
-#endif /* __CR_FILES_REG_H__ */
diff --git a/include/files.h b/include/files.h
index d491cf1..51615c4 100644
--- a/include/files.h
+++ b/include/files.h
@@ -1,5 +1,4 @@
-#ifndef __CR_FILES_H__
-#define __CR_FILES_H__
+#pragma once
 
 #include "compiler.h"
 #include "asm/types.h"
@@ -146,5 +145,3 @@ extern int close_old_fds(struct pstree_item *me);
 #define LREMAP_PARAM	"link-remap"
 
 extern int shared_fdt_prepare(struct pstree_item *item);
-
-#endif /* __CR_FILES_H__ */
diff --git a/include/fsnotify.h b/include/fsnotify.h
index a882fd9..fbd4667 100644
--- a/include/fsnotify.h
+++ b/include/fsnotify.h
@@ -1,5 +1,4 @@
-#ifndef __CR_FSNOTIFY_H__
-#define __CR_FSNOTIFY_H__
+#pragma once
 
 #include "asm/types.h"
 #include "files.h"
@@ -18,5 +17,3 @@ extern struct collect_image_info inotify_cinfo;
 extern struct collect_image_info inotify_mark_cinfo;
 extern struct collect_image_info fanotify_cinfo;
 extern struct collect_image_info fanotify_mark_cinfo;
-
-#endif /* __CR_FSNOTIFY_H__ */
diff --git a/include/image-desc.h b/include/image-desc.h
index a38368b..fce0247 100644
--- a/include/image-desc.h
+++ b/include/image-desc.h
@@ -1,5 +1,4 @@
-#ifndef __CR_IMAGE_DESC_H__
-#define __CR_IMAGE_DESC_H__
+#pragma once
 
 #include "asm/int.h"
 
@@ -96,5 +95,3 @@ struct cr_fd_desc_tmpl {
 };
 
 extern struct cr_fd_desc_tmpl fdset_template[CR_FD_MAX];
-
-#endif /* __CR_IMAGE_DESC_H__ */
diff --git a/include/image.h b/include/image.h
index 099f510..052661a 100644
--- a/include/image.h
+++ b/include/image.h
@@ -1,5 +1,4 @@
-#ifndef __CR_IMAGE_H__
-#define __CR_IMAGE_H__
+#pragma once
 
 #include <stdbool.h>
 
@@ -76,5 +75,3 @@ extern int open_image_at(int dfd, int type, unsigned long flags, ...);
 extern int open_pages_image(unsigned long flags, int pm_fd);
 extern int open_pages_image_at(int dfd, unsigned long flags, int pm_fd);
 extern void up_page_ids_base(void);
-
-#endif /* __CR_IMAGE_H__ */
diff --git a/include/inet_diag.h b/include/inet_diag.h
index 95be2c1..d22b0b1 100644
--- a/include/inet_diag.h
+++ b/include/inet_diag.h
@@ -1,5 +1,4 @@
-#ifndef __CR_INET_DIAG_H__
-#define __CR_INET_DIAG_H__
+#pragma once
 
 #include <linux/types.h>
 
@@ -132,5 +131,3 @@ struct tcpvegas_info {
 	__u32	tcpv_rtt;
 	__u32	tcpv_minrtt;
 };
-
-#endif /* __CR_INET_DIAG_H__ */
diff --git a/include/ipc_ns.h b/include/ipc_ns.h
index a50281f..84c2eab 100644
--- a/include/ipc_ns.h
+++ b/include/ipc_ns.h
@@ -1,9 +1,6 @@
-#ifndef __CR_IPC_NS_H__
-#define __CR_IPC_NS_H__
+#pragma once
 
 extern int dump_ipc_ns(int ns_pid, int ns_id);
 extern int prepare_ipc_ns(int pid);
 
 extern struct ns_desc ipc_ns_desc;
-
-#endif /* __CR_IPC_NS_H__ */
diff --git a/include/kcmp-ids.h b/include/kcmp-ids.h
index e9e9101..c26d986 100644
--- a/include/kcmp-ids.h
+++ b/include/kcmp-ids.h
@@ -1,5 +1,4 @@
-#ifndef __CR_KCMP_IDS_H__
-#define __CR_KCMP_IDS_H__
+#pragma once
 
 #include "kcmp.h"
 
@@ -26,5 +25,3 @@ struct kid_elem {
 extern u32 kid_generate_gen(struct kid_tree *tree,
 			    struct kid_elem *elem, int *new_id);
 extern void kid_show_tree(struct kid_tree *tree);
-
-#endif /* __CR_KCMP_IDS_H__ */
diff --git a/include/kcmp.h b/include/kcmp.h
index 76f557b..f275619 100644
--- a/include/kcmp.h
+++ b/include/kcmp.h
@@ -1,5 +1,4 @@
-#ifndef __CR_KCMP_H__
-#define __CR_KCMP_H__
+#pragma once
 
 enum kcmp_type {
 	KCMP_FILE,
@@ -12,5 +11,3 @@ enum kcmp_type {
 
 	KCMP_TYPES,
 };
-
-#endif /* __CR_KCMP_H__ */
diff --git a/include/kerndat.h b/include/kerndat.h
index 738ad04..64f9f0b 100644
--- a/include/kerndat.h
+++ b/include/kerndat.h
@@ -1,5 +1,4 @@
-#ifndef __CR_KERNDAT_H__
-#define __CR_KERNDAT_H__
+#pragma once
 
 #include "asm/types.h"
 
@@ -19,5 +18,3 @@ extern int tcp_max_wshare;
 extern int tcp_max_rshare;
 
 extern int kern_last_cap;
-
-#endif /* __CR_KERNDAT_H__ */
diff --git a/include/libnetlink.h b/include/libnetlink.h
index 616a111..03679e9 100644
--- a/include/libnetlink.h
+++ b/include/libnetlink.h
@@ -1,5 +1,4 @@
-#ifndef __CR_LIBNETLINK_H__
-#define __CR_LIBNETLINK_H__
+#pragma once
 
 #define CR_NLMSG_SEQ		24680	/* arbitrary chosen */
 
@@ -14,6 +13,3 @@ extern int addattr_l(struct nlmsghdr *n, int maxlen, int type,
 
 #define NLMSG_TAIL(nmsg) \
 	((struct rtattr *) (((void *) (nmsg)) + NLMSG_ALIGN((nmsg)->nlmsg_len)))
-
-
-#endif /* __CR_LIBNETLINK_H__ */
diff --git a/include/list.h b/include/list.h
index 32d8edd..28508c4 100644
--- a/include/list.h
+++ b/include/list.h
@@ -1,5 +1,4 @@
-#ifndef __CR_LIST_H__
-#define __CR_LIST_H__
+#pragma once
 
 /*
  * Double linked lists.
@@ -419,5 +418,3 @@ static inline void hlist_move_list(struct hlist_head *old,
 	for (pos = hlist_entry_safe((head)->first, typeof(*pos), member);	\
 	     pos && ({ n = pos->member.next; 1; });				\
 	     pos = hlist_entry_safe(n, typeof(*pos), member))
-
-#endif /* __CR_LIST_H__ */
diff --git a/include/lock.h b/include/lock.h
index 89d71b1..adde3da 100644
--- a/include/lock.h
+++ b/include/lock.h
@@ -1,5 +1,4 @@
-#ifndef __CR_LOCK_H__
-#define __CR_LOCK_H__
+#pragma once
 
 #include <linux/futex.h>
 #include <sys/time.h>
@@ -135,5 +134,3 @@ static inline void mutex_unlock(mutex_t *m)
 	atomic_set(&m->raw, (int)c);
 	BUG_ON(sys_futex((u32 *)&m->raw.counter, FUTEX_WAKE, 1, NULL, NULL, 0) < 0);
 }
-
-#endif /* __CR_LOCK_H__ */
diff --git a/include/log-levels.h b/include/log-levels.h
index 3e6753f..6a1aa2f 100644
--- a/include/log-levels.h
+++ b/include/log-levels.h
@@ -1,5 +1,4 @@
-#ifndef __CR_LOG_LEVELS_H__
-#define __CR_LOG_LEVELS_H__
+#pragma once
 
 #define LOG_MSG		(0) /* Print message regardless of log level */
 #define LOG_ERROR	(1) /* Errors only, when we're in trouble */
@@ -8,5 +7,3 @@
 #define LOG_DEBUG	(4) /* Debug only */
 
 #define DEFAULT_LOGLEVEL	LOG_WARN
-
-#endif /* __CR_LOG_LEVELS_H__ */
diff --git a/include/log.h b/include/log.h
index 1060254..ebd035f 100644
--- a/include/log.h
+++ b/include/log.h
@@ -1,5 +1,4 @@
-#ifndef __CR_LOG_H__
-#define __CR_LOG_H__
+#pragma once
 
 #include "log-levels.h"
 
@@ -63,5 +62,3 @@ extern int write_pidfile(int pid);
 
 extern void print_data(unsigned long addr, unsigned char *data, size_t size);
 extern void print_image_data(int fd, unsigned int length, int show);
-
-#endif /* __CR_LOG_H__ */
diff --git a/include/magic.h b/include/magic.h
index f17a191..cfdf8c8 100644
--- a/include/magic.h
+++ b/include/magic.h
@@ -1,5 +1,4 @@
-#ifndef __CR_MAGIC_H__
-#define __CR_MAGIC_H__
+#pragma once
 
 /*
  * Basic multi-file images
@@ -79,5 +78,3 @@
 
 #define PAGES_OLD_MAGIC		PAGEMAP_MAGIC
 #define SHM_PAGES_OLD_MAGIC	PAGEMAP_MAGIC
-
-#endif /* __CR_MAGIC_H__ */
diff --git a/include/mem.h b/include/mem.h
index 6cfd2e3..f596632 100644
--- a/include/mem.h
+++ b/include/mem.h
@@ -1,5 +1,4 @@
-#ifndef __CR_MEM_H__
-#define __CR_MEM_H__
+#pragma once
 
 struct parasite_ctl;
 struct vm_area_list;
@@ -21,5 +20,3 @@ extern int parasite_dump_pages_seized(struct parasite_ctl *ctl,
 #define PME_PSHIFT_OFFSET	(PME_STATUS_OFFSET - PME_PSHIFT_BITS)
 #define PME_PFRAME_MASK		((1ULL << PME_PSHIFT_OFFSET) - 1)
 #define PME_PFRAME(x)		((x) & PME_PFRAME_MASK)
-
-#endif /* __CR_MEM_H__ */
diff --git a/include/mman.h b/include/mman.h
index 340d369..1b00088 100644
--- a/include/mman.h
+++ b/include/mman.h
@@ -1,5 +1,4 @@
-#ifndef __CR_MMAN_H__
-#define __CR_MMAN_H__
+#pragma once
 
 #ifndef MAP_HUGETLB
 # define MAP_HUGETLB		0x40000
@@ -13,5 +12,3 @@
 #ifndef MADV_DONTDUMP
 # define MADV_DONTDUMP		16
 #endif
-
-#endif /* __CR_MMAN_H__ */
diff --git a/include/mount.h b/include/mount.h
index a76c027..c0c3cd3 100644
--- a/include/mount.h
+++ b/include/mount.h
@@ -1,5 +1,4 @@
-#ifndef __CR_MOUNT_H__
-#define __CR_MOUNT_H__
+#pragma once
 
 extern int mntns_root;
 extern int mntns_collect_root(pid_t pid);
@@ -24,5 +23,3 @@ extern struct ns_desc mnt_ns_desc;
 
 extern dev_t phys_stat_resolve_dev(dev_t st_dev, const char *path);
 extern bool phys_stat_dev_match(dev_t st_dev, dev_t phys_dev, const char *path);
-
-#endif /* __CR_MOUNT_H__ */
diff --git a/include/namespaces.h b/include/namespaces.h
index 163de8e..f41ff0d 100644
--- a/include/namespaces.h
+++ b/include/namespaces.h
@@ -1,5 +1,4 @@
-#ifndef __CR_NS_H__
-#define __CR_NS_H__
+#pragma once
 
 #include "files.h"
 
@@ -33,5 +32,3 @@ extern int switch_ns(int pid, struct ns_desc *nd, int *rst);
 extern int restore_ns(int rst, struct ns_desc *nd);
 
 extern int dump_task_ns_ids(struct pstree_item *);
-
-#endif /* __CR_NS_H__ */
diff --git a/include/net.h b/include/net.h
index eb29cf5..949b475 100644
--- a/include/net.h
+++ b/include/net.h
@@ -1,5 +1,4 @@
-#ifndef __CR_NET_H__
-#define __CR_NET_H__
+#pragma once
 
 #include "list.h"
 
@@ -23,5 +22,3 @@ extern struct ns_desc net_ns_desc;
 extern int write_netdev_img(NetDeviceEntry *nde, struct cr_fdset *fds);
 extern int read_ns_sys_file(char *path, char *buf, int len);
 extern int restore_link_parms(NetDeviceEntry *nde, int nlsk);
-
-#endif /* __CR_NET_H__ */
diff --git a/include/netfilter.h b/include/netfilter.h
index f3667fc..1ec43c7 100644
--- a/include/netfilter.h
+++ b/include/netfilter.h
@@ -1,5 +1,4 @@
-#ifndef __CR_NETFILTER_H__
-#define __CR_NETFILTER_H__
+#pragma once
 
 struct inet_sk_desc;
 extern int nf_lock_connection(struct inet_sk_desc *);
@@ -7,5 +6,3 @@ extern int nf_unlock_connection(struct inet_sk_desc *);
 
 struct inet_sk_info;
 extern int nf_unlock_connection_info(struct inet_sk_info *);
-
-#endif /* __CR_NETFILTER_H__ */
diff --git a/include/netlink_diag.h b/include/netlink_diag.h
index 14ca403..c080a8f 100644
--- a/include/netlink_diag.h
+++ b/include/netlink_diag.h
@@ -1,5 +1,4 @@
-#ifndef __CR_NETLINK_DIAG_H__
-#define __CR_NETLINK_DIAG_H__
+#pragma once
 
 #include <linux/types.h>
 
@@ -38,5 +37,3 @@ enum {
 
 #define NDIAG_SHOW_MEMINFO	0x00000001 /* show memory info of a socket */
 #define NDIAG_SHOW_GROUPS	0x00000002 /* show groups of a netlink socket */
-
-#endif /* __CR_NETLINK_DIAG_H__ */
diff --git a/include/packet_diag.h b/include/packet_diag.h
index e5d9193..62a4e52 100644
--- a/include/packet_diag.h
+++ b/include/packet_diag.h
@@ -1,5 +1,4 @@
-#ifndef __CR_PACKET_DIAG_H__
-#define __CR_PACKET_DIAG_H__
+#pragma once
 
 #include <linux/types.h>
 
@@ -72,5 +71,3 @@ struct packet_diag_ring {
 	__u32   pdr_sizeof_priv;
 	__u32   pdr_features;
 };
-
-#endif /* __CR_PACKET_DIAG_H__ */
diff --git a/include/page-pipe.h b/include/page-pipe.h
index 393627b..a5f8858 100644
--- a/include/page-pipe.h
+++ b/include/page-pipe.h
@@ -1,5 +1,4 @@
-#ifndef __CR_PAGE_PIPE_H__
-#define __CR_PAGE_PIPE_H__
+#pragma once
 
 #include <sys/uio.h>
 #include "list.h"
@@ -97,5 +96,3 @@ extern int page_pipe_add_page(struct page_pipe *p, unsigned long addr);
 extern int page_pipe_add_hole(struct page_pipe *p, unsigned long addr);
 
 extern void debug_show_page_pipe(struct page_pipe *pp);
-
-#endif /* __CR_PAGE_PIPE_H__ */
diff --git a/include/page-read.h b/include/page-read.h
index 5a11348..beadc53 100644
--- a/include/page-read.h
+++ b/include/page-read.h
@@ -1,5 +1,4 @@
-#ifndef __CR_PAGE_READ_H__
-#define __CR_PAGE_READ_H__
+#pragma once
 
 #include "protobuf/pagemap.pb-c.h"
 
@@ -67,5 +66,3 @@ struct page_read {
 };
 
 extern int open_page_read(int pid, struct page_read *);
-
-#endif /* __CR_PAGE_READ_H__ */
diff --git a/include/page-xfer.h b/include/page-xfer.h
index a681eb6..654070b 100644
--- a/include/page-xfer.h
+++ b/include/page-xfer.h
@@ -1,5 +1,4 @@
-#ifndef __CR_PAGE_XFER__H__
-#define __CR_PAGE_XFER__H__
+#pragma once
 
 extern int cr_page_server(bool daemon_mode);
 
@@ -32,5 +31,3 @@ extern int page_xfer_dump_pages(struct page_xfer *, struct page_pipe *,
 				unsigned long off);
 extern int connect_to_page_server(void);
 extern int disconnect_from_page_server(void);
-
-#endif /* __CR_PAGE_XFER__H__ */
diff --git a/include/parasite-syscall.h b/include/parasite-syscall.h
index 023d002..64474fa 100644
--- a/include/parasite-syscall.h
+++ b/include/parasite-syscall.h
@@ -1,5 +1,4 @@
-#ifndef __CR_PARASITE_SYSCALL_H__
-#define __CR_PARASITE_SYSCALL_H__
+#pragma once
 
 #include "asm/types.h"
 #include "pid.h"
@@ -122,5 +121,3 @@ extern int parasite_fixup_vdso(struct parasite_ctl *ctl, pid_t pid,
 
 extern int parasite_stop_on_syscall(int tasks, int sys_nr);
 extern int parasite_unmap(struct parasite_ctl *ctl, unsigned long addr);
-
-#endif /* __CR_PARASITE_SYSCALL_H__ */
diff --git a/include/parasite.h b/include/parasite.h
index d53242e..867402b 100644
--- a/include/parasite.h
+++ b/include/parasite.h
@@ -1,5 +1,4 @@
-#ifndef __CR_PARASITE_H__
-#define __CR_PARASITE_H__
+#pragma once
 
 #define PARASITE_STACK_SIZE	(16 << 10)
 #define PARASITE_ARG_SIZE_MIN	( 1 << 12)
@@ -201,5 +200,3 @@ struct parasite_tty_args {
 #define parasite_sym(pblob, name) ((void *)(pblob) + parasite_blob_offset__##name)
 
 #endif /* !__ASSEMBLY__ */
-
-#endif /* __CR_PARASITE_H__ */
diff --git a/include/pid.h b/include/pid.h
index d073944..1f85d8d 100644
--- a/include/pid.h
+++ b/include/pid.h
@@ -1,5 +1,4 @@
-#ifndef __CR_PID_H__
-#define __CR_PID_H__
+#pragma once
 
 #include "stdbool.h"
 
@@ -28,5 +27,3 @@ static inline bool pid_rst_prio(unsigned pid_a, unsigned pid_b)
 {
 	return pid_a < pid_b;
 }
-
-#endif /* __CR_PID_H__ */
diff --git a/include/pipes.h b/include/pipes.h
index a52857a..d847cdd 100644
--- a/include/pipes.h
+++ b/include/pipes.h
@@ -1,5 +1,4 @@
-#ifndef __CR_PIPES_H__
-#define __CR_PIPES_H__
+#pragma once
 
 #include "protobuf/pipe-data.pb-c.h"
 
@@ -35,5 +34,3 @@ struct pipe_data_rst {
 
 extern int collect_pipe_data(int img_type, struct pipe_data_rst **hash);
 extern int restore_pipe_data(int img_type, int pfd, u32 id, struct pipe_data_rst **hash);
-
-#endif /* __CR_PIPES_H__ */
diff --git a/include/posix-timer.h b/include/posix-timer.h
index f5d089c..6060f2d 100644
--- a/include/posix-timer.h
+++ b/include/posix-timer.h
@@ -1,5 +1,4 @@
-#ifndef __CR_PROC_POSIX_TIMER_H__
-#define __CR_PROC_POSIX_TIMER_H__
+#pragma once
 
 #include "list.h"
 
@@ -22,5 +21,3 @@ struct proc_posix_timers_stat {
 };
 
 extern int parse_posix_timers(pid_t pid, struct proc_posix_timers_stat * args);
-
-#endif /* __CR_PROC_POSIX_TIMER_H__ */
diff --git a/include/prctl.h b/include/prctl.h
index 2bf1a13..3cbe5a3 100644
--- a/include/prctl.h
+++ b/include/prctl.h
@@ -1,5 +1,4 @@
-#ifndef __CR_PRCTL_H__
-#define __CR_PRCTL_H__
+#pragma once
 
 #ifndef PR_SET_NAME
 # define PR_SET_NAME		15
@@ -37,5 +36,3 @@
 #ifndef PR_GET_TID_ADDRESS
 # define PR_GET_TID_ADDRESS	40
 #endif
-
-#endif /* __CR_PRCTL_H__ */
diff --git a/include/proc_parse.h b/include/proc_parse.h
index 9af46f6..17f0762 100644
--- a/include/proc_parse.h
+++ b/include/proc_parse.h
@@ -1,5 +1,4 @@
-#ifndef __CR_PROC_PARSE_H__
-#define __CR_PROC_PARSE_H__
+#pragma once
 
 #include <sys/types.h>
 #include "asm/types.h"
@@ -157,5 +156,3 @@ extern int parse_file_locks(void);
 
 struct pid;
 extern int parse_threads(int pid, struct pid **_t, int *_n);
-
-#endif /* __CR_PROC_PARSE_H__ */
diff --git a/include/protobuf-desc.h b/include/protobuf-desc.h
index fd9ee43..ca797ed 100644
--- a/include/protobuf-desc.h
+++ b/include/protobuf-desc.h
@@ -1,5 +1,4 @@
-#ifndef __CR_PROTOBUF_DESC_H__
-#define __CR_PROTOBUF_DESC_H__
+#pragma once
 
 #include <sys/types.h>
 #include <google/protobuf-c/protobuf-c.h>
@@ -78,5 +77,3 @@ struct cr_pb_message_desc {
 
 extern void cr_pb_init(void);
 extern struct cr_pb_message_desc cr_pb_descs[PB_MAX];
-
-#endif /* __CR_PROTOBUF_DESC_H__ */
diff --git a/include/protobuf.h b/include/protobuf.h
index ae9a65c..ebf7788 100644
--- a/include/protobuf.h
+++ b/include/protobuf.h
@@ -1,5 +1,4 @@
-#ifndef __CR_PROTOBUF_H__
-#define __CR_PROTOBUF_H__
+#pragma once
 
 #include "protobuf-desc.h"
 
@@ -51,5 +50,3 @@ struct collect_image_info {
 #define COLLECT_OPTIONAL	0x2	/* image file may be missing */
 
 extern int collect_image(struct collect_image_info *);
-
-#endif /* __CR_PROTOBUF_H__ */
diff --git a/include/pstree.h b/include/pstree.h
index c1f7426..a8bb7b5 100644
--- a/include/pstree.h
+++ b/include/pstree.h
@@ -1,5 +1,4 @@
-#ifndef __CR_PSTREE_H__
-#define __CR_PSTREE_H__
+#pragma once
 
 #include "list.h"
 #include "pid.h"
@@ -66,5 +65,3 @@ extern void core_entry_free(CoreEntry *core);
 extern CoreEntry *core_entry_alloc(int alloc_thread_info, int alloc_tc);
 extern int pstree_alloc_cores(struct pstree_item *item);
 extern void pstree_free_cores(struct pstree_item *item);
-
-#endif /* __CR_PSTREE_H__ */
diff --git a/include/ptrace.h b/include/ptrace.h
index d8034b4..0cc2d1a 100644
--- a/include/ptrace.h
+++ b/include/ptrace.h
@@ -1,5 +1,4 @@
-#ifndef __CR_PTRACE_H__
-#define __CR_PTRACE_H__
+#pragma once
 
 #include <linux/types.h>
 #include <sys/ptrace.h>
@@ -60,5 +59,3 @@ extern int unseize_task(pid_t pid, int state);
 extern int ptrace_peek_area(pid_t pid, void *dst, void *addr, long bytes);
 extern int ptrace_poke_area(pid_t pid, void *src, void *addr, long bytes);
 extern int ptrace_swap_area(pid_t pid, void *dst, void *src, long bytes);
-
-#endif /* __CR_PTRACE_H__ */
diff --git a/include/rbtree.h b/include/rbtree.h
index f608210..e081333 100644
--- a/include/rbtree.h
+++ b/include/rbtree.h
@@ -2,8 +2,7 @@
  * RBtree implementation adopted from the Linux kernel sources.
  */
 
-#ifndef __CR_RBTREE_H__
-#define __CR_RBTREE_H__
+#pragma once
 
 #include <stddef.h>
 
@@ -85,5 +84,3 @@ static inline void rb_link_and_balance(struct rb_root *root,
 	rb_link_node(node, parent, rb_link);
 	rb_insert_color(node, root);
 }
-
-#endif /* __CR_RBTREE_H__ */
diff --git a/include/restorer.h b/include/restorer.h
index e283b28..5026fda 100644
--- a/include/restorer.h
+++ b/include/restorer.h
@@ -1,5 +1,4 @@
-#ifndef __CR_RESTORER_H__
-#define __CR_RESTORER_H__
+#pragma once
 
 #include <signal.h>
 #include <limits.h>
@@ -188,5 +187,3 @@ enum {
 #define vma_priv(vma) ((vma_entry_is(vma, VMA_AREA_REGULAR)) &&	\
 			(vma_entry_is(vma, VMA_ANON_PRIVATE) || \
 			vma_entry_is(vma, VMA_FILE_PRIVATE)))
-
-#endif /* __CR_RESTORER_H__ */
diff --git a/include/rst-malloc.h b/include/rst-malloc.h
index 75d0d3f..362ecad 100644
--- a/include/rst-malloc.h
+++ b/include/rst-malloc.h
@@ -1,5 +1,4 @@
-#ifndef __CR_RST_MALLOC__H__
-#define __CR_RST_MALLOC__H__
+#pragma once
 
 /*
  * On restore we need differetn types of memory allocation.
@@ -64,5 +63,3 @@ extern void rst_mem_free_last(int type);
  */
 extern unsigned long rst_mem_remap_size(void);
 extern int rst_mem_remap(void *to);
-
-#endif /* __CR_RST_MALLOC__H__ */
diff --git a/include/servicefd.h b/include/servicefd.h
index ea52bea..a4c0220 100644
--- a/include/servicefd.h
+++ b/include/servicefd.h
@@ -1,6 +1,4 @@
-#ifndef __CR_SERVICE_FD_H__
-#define __CR_SERVICE_FD_H__
-
+#pragma once
 #include <stdbool.h>
 
 enum sfd_type {
@@ -29,4 +27,3 @@ extern int close_service_fd(enum sfd_type type);
 extern bool is_service_fd(int fd, enum sfd_type type);
 extern bool is_any_service_fd(int fd);
 
-#endif /* __CR_SERVICE_FD_H__ */
diff --git a/include/shmem.h b/include/shmem.h
index cdb0589..df361db 100644
--- a/include/shmem.h
+++ b/include/shmem.h
@@ -1,5 +1,4 @@
-#ifndef __CR_SHMEM_H__
-#define __CR_SHMEM_H__
+#pragma once
 
 #include "lock.h"
 
@@ -44,5 +43,3 @@ find_shmem(struct shmem_info *shmems, int nr, unsigned long shmid)
 
 	return NULL;
 }
-
-#endif /* __CR_SHMEM_H__ */
diff --git a/include/signalfd.h b/include/signalfd.h
index b36f9ac..40fe345 100644
--- a/include/signalfd.h
+++ b/include/signalfd.h
@@ -1,10 +1,7 @@
-#ifndef __CR_SIGNALFD_H__
-#define __CR_SIGNALFD_H__
+#pragma once
 
 struct cr_fdset;
 struct fd_parms;
 extern int is_signalfd_link(int lfd);
 extern const struct fdtype_ops signalfd_dump_ops;
 extern struct collect_image_info signalfd_cinfo;
-
-#endif /* __CR_SIGNALFD_H__ */
diff --git a/include/sk-inet.h b/include/sk-inet.h
index e8fc74f..1c5be8b 100644
--- a/include/sk-inet.h
+++ b/include/sk-inet.h
@@ -1,5 +1,4 @@
-#ifndef __CR_SK_INET_H__
-#define __CR_SK_INET_H__
+#pragma once
 
 #include <netinet/tcp.h>
 
@@ -79,5 +78,3 @@ extern int restore_one_tcp(int sk, struct inet_sk_info *si);
 
 extern int check_tcp(void);
 extern int rst_tcp_socks_add(int fd, bool reuseaddr);
-
-#endif /* __CR_SK_INET_H__ */
diff --git a/include/sk-packet.h b/include/sk-packet.h
index 4c740c0..994a2ee 100644
--- a/include/sk-packet.h
+++ b/include/sk-packet.h
@@ -1,5 +1,4 @@
-#ifndef __CR_SK_PACKET_H__
-#define __CR_SK_PACKET_H__
+#pragma once
 
 #ifndef PACKET_TIMESTAMP
 #define PACKET_TIMESTAMP	17
@@ -33,5 +32,3 @@ struct tpacket_req3 {
 	unsigned int tp_feature_req_word;
 };
 #endif
-
-#endif /* __CR_SK_PACKET_H__ */
diff --git a/include/sk-queue.h b/include/sk-queue.h
index 9044de0..c5fe93f 100644
--- a/include/sk-queue.h
+++ b/include/sk-queue.h
@@ -1,8 +1,5 @@
-#ifndef __CR_SK_QUEUE_H__
-#define __CR_SK_QUEUE_H__
+#pragma once
 
 extern int read_sk_queues(void);
 extern int dump_sk_queue(int sock_fd, int sock_id);
 extern int restore_sk_queue(int fd, unsigned int peer_id);
-
-#endif /* __CR_SK_QUEUE_H__ */
diff --git a/include/sockets.h b/include/sockets.h
index 34ae0ac..5a22ce7 100644
--- a/include/sockets.h
+++ b/include/sockets.h
@@ -1,5 +1,4 @@
-#ifndef __CR_SOCKETS_H__
-#define __CR_SOCKETS_H__
+#pragma once
 
 #include <stdbool.h>
 
@@ -79,5 +78,3 @@ static inline int sk_decode_shutdown(int val)
 }
 
 #define USK_EXT_PARAM "ext-unix-sk"
-
-#endif /* __CR_SOCKETS_H__ */
diff --git a/include/stats.h b/include/stats.h
index aa25050..629c7ae 100644
--- a/include/stats.h
+++ b/include/stats.h
@@ -1,5 +1,4 @@
-#ifndef __CR_STATS_H__
-#define __CR_STATS_H__
+#pragma once
 
 enum {
 	TIME_FREEZING,
@@ -42,5 +41,3 @@ extern void cnt_add(int c, unsigned long val);
 
 extern int init_stats(int what);
 extern void write_stats(int what);
-
-#endif /* __CR_STATS_H__ */
diff --git a/include/string.h b/include/string.h
index 8454b4d..9b52cb4 100644
--- a/include/string.h
+++ b/include/string.h
@@ -1,5 +1,4 @@
-#ifndef __CR_STRING_H__
-#define __CR_STRING_H__
+#pragma once
 
 #include <sys/types.h>
 #include <string.h>
@@ -13,5 +12,3 @@ extern size_t strlcpy(char *dest, const char *src, size_t size);
 #ifndef CONFIG_HAS_STRLCAT
 extern size_t strlcat(char *dest, const char *src, size_t count);
 #endif
-
-#endif /* __CR_STRING_H__ */
diff --git a/include/syscall-types.h b/include/syscall-types.h
index ca22b8e..3e451d7 100644
--- a/include/syscall-types.h
+++ b/include/syscall-types.h
@@ -5,8 +5,7 @@
  * Anything else should go to plain type.h
  */
 
-#ifndef __CR_SYSCALL_TYPES_H__
-#define __CR_SYSCALL_TYPES_H__
+#pragma once
 
 #include <sys/time.h>
 #include <arpa/inet.h>
@@ -68,5 +67,3 @@ struct krlimit {
 	unsigned long rlim_cur;
 	unsigned long rlim_max;
 };
-
-#endif /* __CR_SYSCALL_TYPES_H__ */
diff --git a/include/sysctl.h b/include/sysctl.h
index 4a7682d..b54dacf 100644
--- a/include/sysctl.h
+++ b/include/sysctl.h
@@ -1,5 +1,4 @@
-#ifndef __CR_SYSCTL_H__
-#define __CR_SYSCTL_H__
+#pragma once
 
 struct sysctl_req {
 	char	*name;
@@ -30,5 +29,3 @@ enum {
 
 #define CTL_LEN(t)	((t) >> CTL_SHIFT)
 #define CTL_TYPE(t)	((t) & ((1 << CTL_SHIFT) - 1))
-
-#endif /* __CR_SYSCTL_H__ */
diff --git a/include/tty.h b/include/tty.h
index d2c31e2..ee3c1eb 100644
--- a/include/tty.h
+++ b/include/tty.h
@@ -1,5 +1,4 @@
-#ifndef __CR_TTY_H__
-#define __CR_TTY_H__
+#pragma once
 
 #include "files.h"
 
@@ -25,5 +24,3 @@ extern int tty_prep_fds(void);
 extern void tty_fini_fds(void);
 
 #define OPT_SHELL_JOB	"shell-job"
-
-#endif /* __CR_TTY_H__ */
diff --git a/include/tun.h b/include/tun.h
index 9495435..6b807f3 100644
--- a/include/tun.h
+++ b/include/tun.h
@@ -1,5 +1,4 @@
-#ifndef __CR_TUN_H__
-#define __CR_TUN_H__
+#pragma once
 
 #ifndef TUN_MINOR
 #define TUN_MINOR	200
@@ -12,5 +11,3 @@ extern int dump_tun_link(NetDeviceEntry *nde, struct cr_fdset *fds);
 extern int restore_one_tun(NetDeviceEntry *nde, int nlsk);
 extern struct collect_image_info tunfile_cinfo;
 extern int check_tun(void);
-
-#endif /* __CR_TUN_H__ */
diff --git a/include/unix_diag.h b/include/unix_diag.h
index 3f24683..200f5ea 100644
--- a/include/unix_diag.h
+++ b/include/unix_diag.h
@@ -1,5 +1,4 @@
-#ifndef __CR_UNIX_DIAG_H__
-#define __CR_UNIX_DIAG_H__
+#pragma once
 
 #include "asm/types.h"
 
@@ -63,5 +62,3 @@ struct unix_diag_rqlen {
 	u32	udiag_rqueue;
 	u32	udiag_wqueue;
 };
-
-#endif /* __CR_UNIX_DIAG_H__ */
diff --git a/include/util-pie.h b/include/util-pie.h
index cbaed42..cb0a1f4 100644
--- a/include/util-pie.h
+++ b/include/util-pie.h
@@ -1,5 +1,4 @@
-#ifndef __CR_UTIL_NET_H__
-#define __CR_UTIL_NET_H__
+#pragma once
 
 #include <sys/socket.h>
 #include <sys/un.h>
@@ -62,5 +61,3 @@ static inline int recv_fd(int sock)
 }
 
 extern int open_detach_mount(char *dir);
-
-#endif /* __CR_UTIL_NET_H__ */
diff --git a/include/util.h b/include/util.h
index c081921..5d1b46a 100644
--- a/include/util.h
+++ b/include/util.h
@@ -1,5 +1,4 @@
-#ifndef __CR_UTIL_H__
-#define __CR_UTIL_H__
+#pragma once
 
 /*
  * Some bits are stolen from perf and kvm tools
@@ -289,5 +288,3 @@ extern int read_fd_link(int lfd, char *buf, size_t size);
 
 #define USEC_PER_SEC	1000000L
 #define NSEC_PER_SEC    1000000000L
-
-#endif /* __CR_UTIL_H__ */
diff --git a/include/uts_ns.h b/include/uts_ns.h
index ff499ac..973884f 100644
--- a/include/uts_ns.h
+++ b/include/uts_ns.h
@@ -1,9 +1,6 @@
-#ifndef __CR_UTS_NS_H__
-#define __CR_UTS_NS_H__
+#pragma once
 
 extern int dump_uts_ns(int ns_pid, int ns_id);
 extern int prepare_utsns(int pid);
 
 extern struct ns_desc uts_ns_desc;
-
-#endif /* __CR_UTS_NS_H__ */
diff --git a/include/vdso.h b/include/vdso.h
index 3f2f01f..90a7a1d 100644
--- a/include/vdso.h
+++ b/include/vdso.h
@@ -1,5 +1,4 @@
-#ifndef __CR_VDSO_H__
-#define __CR_VDSO_H__
+#pragma once
 
 #include <sys/mman.h>
 #include <stdbool.h>
@@ -110,5 +109,3 @@ static inline void vdso_put_mark(void *where, unsigned long proxy_addr)
 extern struct vdso_symtable vdso_sym_rt;
 extern u64 vdso_pfn;
 extern int vdso_init(void);
-
-#endif /* __CR_VDSO_H__ */
diff --git a/include/vma.h b/include/vma.h
index 481b690..3410049 100644
--- a/include/vma.h
+++ b/include/vma.h
@@ -1,5 +1,4 @@
-#ifndef __CR_VMA_H__
-#define __CR_VMA_H__
+#pragma once
 
 #include "list.h"
 #include "protobuf/vma.pb-c.h"
@@ -49,5 +48,3 @@ static inline int in_vma_area(struct vma_area *vma, unsigned long addr)
 	return addr >= (unsigned long)vma->vma.start &&
 		addr < (unsigned long)vma->vma.end;
 }
-
-#endif /* __CR_VMA_H__ */
diff --git a/include/xmalloc.h b/include/xmalloc.h
index a5cc608..753a450 100644
--- a/include/xmalloc.h
+++ b/include/xmalloc.h
@@ -1,5 +1,4 @@
-#ifndef __CR_XMALLOC_H__
-#define __CR_XMALLOC_H__
+#pragma once
 
 #include <stdlib.h>
 #include <string.h>
@@ -35,5 +34,3 @@
 
 #define memzero_p(p)		memset(p, 0, sizeof(*p))
 #define memzero(p, size)	memset(p, 0, size)
-
-#endif /* __CR_XMALLOC_H__ */
-- 
1.8.5.2



More information about the CRIU mailing list