[PATCH 17/46] util: storage: use #pragma once in headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>
---
 src/util/virstorageencryption.h  | 17 +++++++----------
 src/util/virstoragefile.h        | 31 ++++++++++++++-----------------
 src/util/virstoragefilebackend.h |  9 +++------
 3 files changed, 24 insertions(+), 33 deletions(-)

diff --git a/src/util/virstorageencryption.h b/src/util/virstorageencryption.h
index 68d879a63e..3e5485d88b 100644
--- a/src/util/virstorageencryption.h
+++ b/src/util/virstorageencryption.h
@@ -18,16 +18,15 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_VIRSTORAGEENCRYPTION_H
-# define LIBVIRT_VIRSTORAGEENCRYPTION_H
+#pragma once
 
-# include "internal.h"
-# include "virbuffer.h"
-# include "virsecret.h"
-# include "virutil.h"
-# include "virenum.h"
+#include "internal.h"
+#include "virbuffer.h"
+#include "virsecret.h"
+#include "virutil.h"
+#include "virenum.h"
 
-# include <libxml/tree.h>
+#include <libxml/tree.h>
 
 typedef enum {
     VIR_STORAGE_ENCRYPTION_SECRET_TYPE_PASSPHRASE = 0,
@@ -93,5 +92,3 @@ enum {
 };
 
 int virStorageGenerateQcowPassphrase(unsigned char *dest);
-
-#endif /* LIBVIRT_VIRSTORAGEENCRYPTION_H */
diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h
index 763030eefa..38ba901858 100644
--- a/src/util/virstoragefile.h
+++ b/src/util/virstoragefile.h
@@ -19,19 +19,18 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_VIRSTORAGEFILE_H
-# define LIBVIRT_VIRSTORAGEFILE_H
+#pragma once
 
-# include <sys/stat.h>
+#include <sys/stat.h>
 
-# include "virbitmap.h"
-# include "virobject.h"
-# include "virseclabel.h"
-# include "virstorageencryption.h"
-# include "virutil.h"
-# include "virsecret.h"
-# include "virautoclean.h"
-# include "virenum.h"
+#include "virbitmap.h"
+#include "virobject.h"
+#include "virseclabel.h"
+#include "virstorageencryption.h"
+#include "virutil.h"
+#include "virsecret.h"
+#include "virautoclean.h"
+#include "virenum.h"
 
 /* Minimum header size required to probe all known formats with
  * virStorageFileProbeFormat, or obtain metadata from a known format.
@@ -39,7 +38,7 @@
  * 32769).  Some formats can be probed with fewer bytes.  Although
  * some formats theoretically permit metadata that can rely on offsets
  * beyond this size, in practice that doesn't matter.  */
-# define VIR_STORAGE_MAX_HEADER 0x8200
+#define VIR_STORAGE_MAX_HEADER 0x8200
 
 
 /* Types of disk backends (host resource).  Comparable to the public
@@ -341,9 +340,9 @@ struct _virStorageSource {
 };
 
 
-# ifndef DEV_BSIZE
-#  define DEV_BSIZE 512
-# endif
+#ifndef DEV_BSIZE
+# define DEV_BSIZE 512
+#endif
 
 int virStorageFileProbeFormat(const char *path, uid_t uid, gid_t gid);
 
@@ -548,5 +547,3 @@ void virStorageFileReportBrokenChain(int errcode,
                                      virStorageSourcePtr parent);
 
 VIR_DEFINE_AUTOPTR_FUNC(virStorageAuthDef, virStorageAuthDefFree);
-
-#endif /* LIBVIRT_VIRSTORAGEFILE_H */
diff --git a/src/util/virstoragefilebackend.h b/src/util/virstoragefilebackend.h
index c93bc4033a..c7af77bf8f 100644
--- a/src/util/virstoragefilebackend.h
+++ b/src/util/virstoragefilebackend.h
@@ -18,12 +18,11 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_VIRSTORAGEFILEBACKEND_H
-# define LIBVIRT_VIRSTORAGEFILEBACKEND_H
+#pragma once
 
-# include <sys/stat.h>
+#include <sys/stat.h>
 
-# include "virstoragefile.h"
+#include "virstoragefile.h"
 
 /* ------- virStorageFile backends ------------ */
 typedef struct _virStorageFileBackend virStorageFileBackend;
@@ -99,5 +98,3 @@ struct _virStorageFileBackend {
 };
 
 int virStorageFileBackendRegister(virStorageFileBackendPtr backend);
-
-#endif /* LIBVIRT_VIRSTORAGEFILEBACKEND_H */
-- 
2.20.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux