[libvirt] [PATCH 29/46] util: hash: use #pragma once in headers

Jonathon Jongsma jjongsma at redhat.com
Tue Jun 18 16:12:59 UTC 2019


Signed-off-by: Jonathon Jongsma <jjongsma at redhat.com>
---
 src/util/virhash.h     | 8 ++------
 src/util/virhashcode.h | 7 ++-----
 2 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/src/util/virhash.h b/src/util/virhash.h
index d2156a5ce0..ed3774e693 100644
--- a/src/util/virhash.h
+++ b/src/util/virhash.h
@@ -7,11 +7,9 @@
  * Copyright (C) 2000 Bjorn Reese and Daniel Veillard.
  */
 
-#ifndef LIBVIRT_VIRHASH_H
-# define LIBVIRT_VIRHASH_H
+#pragma once
 
-
-# include "virautoclean.h"
+#include "virautoclean.h"
 
 /*
  * The hash table.
@@ -198,5 +196,3 @@ void *virHashSearch(const virHashTable *table, virHashSearcher iter,
 void virHashValueFree(void *value, const void *name);
 
 VIR_DEFINE_AUTOPTR_FUNC(virHashTable, virHashFree);
-
-#endif /* LIBVIRT_VIRHASH_H */
diff --git a/src/util/virhashcode.h b/src/util/virhashcode.h
index e512e04bac..af877c93cc 100644
--- a/src/util/virhashcode.h
+++ b/src/util/virhashcode.h
@@ -25,12 +25,9 @@
  * clients can be both 64 or 32 bit at the same time.
  */
 
-#ifndef LIBVIRT_VIRHASHCODE_H
-# define LIBVIRT_VIRHASHCODE_H
+#pragma once
 
-# include "internal.h"
+#include "internal.h"
 
 uint32_t virHashCodeGen(const void *key, size_t len, uint32_t seed)
     ATTRIBUTE_NOINLINE;
-
-#endif /* LIBVIRT_VIRHASHCODE_H */
-- 
2.20.1




More information about the libvir-list mailing list