diff --git a/src/locking/domain_lock.h b/src/locking/domain_lock.h
index 02417b471b62f12cf6b1e49b6927e76f3c028200..6f197bf08bf821df45f6d2080f3a9e738af07dda 100644
--- a/src/locking/domain_lock.h
+++ b/src/locking/domain_lock.h
@@ -19,12 +19,11 @@
*
*/
-#ifndef LIBVIRT_DOMAIN_LOCK_H
-# define LIBVIRT_DOMAIN_LOCK_H
+#pragma once
-# include "internal.h"
-# include "domain_conf.h"
-# include "lock_manager.h"
+#include "internal.h"
+#include "domain_conf.h"
+#include "lock_manager.h"
int virDomainLockProcessStart(virLockManagerPluginPtr plugin,
const char *uri,
@@ -57,5 +56,3 @@ int virDomainLockLeaseAttach(virLockManagerPluginPtr plugin,
int virDomainLockLeaseDetach(virLockManagerPluginPtr plugin,
virDomainObjPtr dom,
virDomainLeaseDefPtr lease);
-
-#endif /* LIBVIRT_DOMAIN_LOCK_H */
diff --git a/src/locking/lock_daemon.h b/src/locking/lock_daemon.h
index 5c7f976ea4e5d7c9d8e1ce2fb5a26f644a581bc8..7d30551c32038206cf31c40b38ed690c35a55f24 100644
--- a/src/locking/lock_daemon.h
+++ b/src/locking/lock_daemon.h
@@ -18,11 +18,10 @@
* .
*/
-#ifndef LIBVIRT_LOCK_DAEMON_H
-# define LIBVIRT_LOCK_DAEMON_H
+#pragma once
-# include "virlockspace.h"
-# include "virthread.h"
+#include "virlockspace.h"
+#include "virthread.h"
typedef struct _virLockDaemon virLockDaemon;
typedef virLockDaemon *virLockDaemonPtr;
@@ -50,5 +49,3 @@ int virLockDaemonAddLockSpace(virLockDaemonPtr lockd,
virLockSpacePtr virLockDaemonFindLockSpace(virLockDaemonPtr lockd,
const char *path);
-
-#endif /* LIBVIRT_LOCK_DAEMON_H */
diff --git a/src/locking/lock_daemon_config.h b/src/locking/lock_daemon_config.h
index e820d60268a16491b23330ace89d8d4ca9a266a2..0f47ab1ed0f5f219d403fcae7a72e96ca1fd3cde 100644
--- a/src/locking/lock_daemon_config.h
+++ b/src/locking/lock_daemon_config.h
@@ -19,10 +19,9 @@
* .
*/
-#ifndef LIBVIRT_LOCK_DAEMON_CONFIG_H
-# define LIBVIRT_LOCK_DAEMON_CONFIG_H
+#pragma once
-# include "internal.h"
+#include "internal.h"
typedef struct _virLockDaemonConfig virLockDaemonConfig;
typedef virLockDaemonConfig *virLockDaemonConfigPtr;
@@ -42,5 +41,3 @@ void virLockDaemonConfigFree(virLockDaemonConfigPtr data);
int virLockDaemonConfigLoadFile(virLockDaemonConfigPtr data,
const char *filename,
bool allow_missing);
-
-#endif /* LIBVIRT_LOCK_DAEMON_CONFIG_H */
diff --git a/src/locking/lock_daemon_dispatch.h b/src/locking/lock_daemon_dispatch.h
index 568a7e0160cd4a38ce0b6b2cc8c565ebf5918f35..d269ba10a8be09d2139277cc4fc08889b2bd1017 100644
--- a/src/locking/lock_daemon_dispatch.h
+++ b/src/locking/lock_daemon_dispatch.h
@@ -18,12 +18,9 @@
* .
*/
-#ifndef LIBVIRT_LOCK_DAEMON_DISPATCH_H
-# define LIBVIRT_LOCK_DAEMON_DISPATCH_H
+#pragma once
-# include "rpc/virnetserverprogram.h"
+#include "rpc/virnetserverprogram.h"
extern virNetServerProgramProc virLockSpaceProtocolProcs[];
extern size_t virLockSpaceProtocolNProcs;
-
-#endif /* LIBVIRT_LOCK_DAEMON_DISPATCH_H */
diff --git a/src/locking/lock_driver.h b/src/locking/lock_driver.h
index 50c73a70d44da3929ab9badda00a638eba6b6317..e53c28ee33bcb0ee4566b079f61f4df430d1707d 100644
--- a/src/locking/lock_driver.h
+++ b/src/locking/lock_driver.h
@@ -19,11 +19,10 @@
*
*/
-#ifndef LIBVIRT_LOCK_DRIVER_H
-# define LIBVIRT_LOCK_DRIVER_H
+#pragma once
-# include "internal.h"
-# include "domain_conf.h"
+#include "internal.h"
+#include "domain_conf.h"
typedef struct _virLockManager virLockManager;
typedef virLockManager *virLockManagerPtr;
@@ -102,11 +101,11 @@ struct _virLockManagerParam {
* Changes in minor version denote new compatible API entry points
* Changes in micro version denote new compatible flags
*/
-# define VIR_LOCK_MANAGER_VERSION_MAJOR 1
-# define VIR_LOCK_MANAGER_VERSION_MINOR 0
-# define VIR_LOCK_MANAGER_VERSION_MICRO 0
+#define VIR_LOCK_MANAGER_VERSION_MAJOR 1
+#define VIR_LOCK_MANAGER_VERSION_MINOR 0
+#define VIR_LOCK_MANAGER_VERSION_MICRO 0
-# define VIR_LOCK_MANAGER_VERSION \
+#define VIR_LOCK_MANAGER_VERSION \
((VIR_LOCK_MANAGER_VERSION_MAJOR * 1000 * 1000) + \
(VIR_LOCK_MANAGER_VERSION_MINOR * 1000) + \
(VIR_LOCK_MANAGER_VERSION_MICRO))
@@ -314,6 +313,3 @@ struct _virLockDriver {
virLockDriverRelease drvRelease;
virLockDriverInquire drvInquire;
};
-
-
-#endif /* LIBVIRT_LOCK_DRIVER_H */
diff --git a/src/locking/lock_driver_lockd.h b/src/locking/lock_driver_lockd.h
index d79d5e738addfcdc94816797b49b5fe89d27d240..b9eaab4831bf68352a0fc135b0b51d2b7ac9c38b 100644
--- a/src/locking/lock_driver_lockd.h
+++ b/src/locking/lock_driver_lockd.h
@@ -19,12 +19,9 @@
*
*/
-#ifndef LIBVIRT_LOCK_DRIVER_LOCKD_H
-# define LIBVIRT_LOCK_DRIVER_LOCKD_H
+#pragma once
enum virLockSpaceProtocolAcquireResourceFlags {
VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_SHARED = (1 << 0),
VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_AUTOCREATE = (1 << 1),
};
-
-#endif /* LIBVIRT_LOCK_DRIVER_LOCKD_H */
diff --git a/src/locking/lock_driver_nop.h b/src/locking/lock_driver_nop.h
index 2443072e3d57825a3ab7c1a9e9bf7ef3146ac66f..e2525e0bd18be55f7f496269b1c1b18604340762 100644
--- a/src/locking/lock_driver_nop.h
+++ b/src/locking/lock_driver_nop.h
@@ -19,12 +19,8 @@
*
*/
-#ifndef LIBVIRT_LOCK_DRIVER_NOP_H
-# define LIBVIRT_LOCK_DRIVER_NOP_H
+#pragma once
-# include "lock_driver.h"
+#include "lock_driver.h"
extern virLockDriver virLockDriverNop;
-
-
-#endif /* LIBVIRT_LOCK_DRIVER_NOP_H */
diff --git a/src/locking/lock_manager.h b/src/locking/lock_manager.h
index 71d39097092ddbacfd49416c5514f59ab314450f..4a19f58879789245166f5cf6fd6409e7c835db7b 100644
--- a/src/locking/lock_manager.h
+++ b/src/locking/lock_manager.h
@@ -19,11 +19,10 @@
*
*/
-#ifndef LIBVIRT_LOCK_MANAGER_H
-# define LIBVIRT_LOCK_MANAGER_H
+#pragma once
-# include "internal.h"
-# include "lock_driver.h"
+#include "internal.h"
+#include "lock_driver.h"
typedef struct _virLockManagerPlugin virLockManagerPlugin;
typedef virLockManagerPlugin *virLockManagerPluginPtr;
@@ -66,5 +65,3 @@ int virLockManagerInquire(virLockManagerPtr manager,
unsigned int flags);
int virLockManagerFree(virLockManagerPtr manager);
-
-#endif /* LIBVIRT_LOCK_MANAGER_H */