]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: dbus: use #pragma once in headers
authorJonathon Jongsma <jjongsma@redhat.com>
Tue, 18 Jun 2019 16:12:57 +0000 (11:12 -0500)
committerJán Tomko <jtomko@redhat.com>
Wed, 19 Jun 2019 15:12:32 +0000 (17:12 +0200)
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
src/util/virdbus.h
src/util/virdbuspriv.h

index c1e5de31abd117175f15928c2d846f3d83cd9789..083c074d590d41bc7d820bc7246dfb0bcb5af9b6 100644 (file)
  *
  */
 
-#ifndef LIBVIRT_VIRDBUS_H
-# define LIBVIRT_VIRDBUS_H
+#pragma once
 
-# ifdef WITH_DBUS
-#  undef interface /* Work around namespace pollution in mingw's rpc.h */
-#  include <dbus/dbus.h>
-# else
-#  define DBusConnection void
-#  define DBusMessage void
-# endif
-# include "internal.h"
+#ifdef WITH_DBUS
+# undef interface /* Work around namespace pollution in mingw's rpc.h */
+# include <dbus/dbus.h>
+#else
+# define DBusConnection void
+# define DBusMessage void
+#endif
+#include "internal.h"
 
-# include <stdarg.h>
+#include <stdarg.h>
 
 void virDBusSetSharedBus(bool shared);
 
@@ -75,4 +74,3 @@ int virDBusIsServiceEnabled(const char *name);
 int virDBusIsServiceRegistered(const char *name);
 
 bool virDBusErrorIsUnknownMethod(virErrorPtr err);
-#endif /* LIBVIRT_VIRDBUS_H */
index 5c0c7f8b6eafe0f62b0e8217b1561d199142ee8f..f96f393ff5d060972df1c4c39b4c33dbfb845479 100644 (file)
 # error "virdbuspriv.h may only be included by virdbus.c or test suites"
 #endif /* LIBVIRT_VIRDBUSPRIV_H_ALLOW */
 
-#ifndef LIBVIRT_VIRDBUSPRIV_H
-# define LIBVIRT_VIRDBUSPRIV_H
+#pragma once
 
-# include "virdbus.h"
+#include "virdbus.h"
 
-# if defined(WITH_DBUS) && !HAVE_DBUSBASICVALUE
+#if defined(WITH_DBUS) && !HAVE_DBUSBASICVALUE
 /* Copied (and simplified) from dbus 1.6.12, for use with older dbus headers */
 typedef union
 {
@@ -42,7 +41,7 @@ typedef union
   double dbl;          /**< as double */
   unsigned char byt;   /**< as byte */
 } DBusBasicValue;
-# endif
+#endif
 
 int virDBusMessageEncodeArgs(DBusMessage* msg,
                              const char *types,
@@ -55,5 +54,3 @@ int virDBusMessageDecodeArgs(DBusMessage* msg,
 int virDBusMessageEncode(DBusMessage* msg,
                          const char *types,
                          ...);
-
-#endif /* LIBVIRT_VIRDBUSPRIV_H */