]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: network: use #pragma once in headers
authorJonathon Jongsma <jjongsma@redhat.com>
Fri, 7 Jun 2019 20:20:17 +0000 (15:20 -0500)
committerJán Tomko <jtomko@redhat.com>
Thu, 13 Jun 2019 15:05:09 +0000 (17:05 +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/conf/netdev_bandwidth_conf.h
src/conf/netdev_vlan_conf.h
src/conf/netdev_vport_profile_conf.h
src/conf/network_conf.h
src/conf/network_event.h
src/conf/networkcommon_conf.h
src/conf/virnetworkobj.h

index 7fe750ce27b114c04f8f72a119605886aa6ba4f7..c10574d0b6014c2fac12b7cc7bc0dee267e12e09 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_NETDEV_BANDWIDTH_CONF_H
-# define LIBVIRT_NETDEV_BANDWIDTH_CONF_H
+#pragma once
 
-# include "internal.h"
-# include "virnetdevbandwidth.h"
-# include "virbuffer.h"
-# include "virxml.h"
-# include "domain_conf.h"
+#include "internal.h"
+#include "virnetdevbandwidth.h"
+#include "virbuffer.h"
+#include "virxml.h"
+#include "domain_conf.h"
 
 int virNetDevBandwidthParse(virNetDevBandwidthPtr *bandwidth,
                             xmlNodePtr node,
@@ -56,5 +55,3 @@ static inline bool virNetDevSupportBandwidth(virDomainNetType type)
     }
     return false;
 }
-
-#endif /* LIBVIRT_NETDEV_BANDWIDTH_CONF_H */
index e3a99790eb9a9fc13ddbb7ed091e8125cdc17348..f798c2ae2d532bbc12ad18e163ac4ea5d0db96f0 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_NETDEV_VLAN_CONF_H
-# define LIBVIRT_NETDEV_VLAN_CONF_H
+#pragma once
 
-# include "internal.h"
-# include "virnetdevvlan.h"
-# include "virbuffer.h"
-# include "virxml.h"
+#include "internal.h"
+#include "virnetdevvlan.h"
+#include "virbuffer.h"
+#include "virxml.h"
 
 int virNetDevVlanParse(xmlNodePtr node, xmlXPathContextPtr ctxt, virNetDevVlanPtr def);
 int virNetDevVlanFormat(const virNetDevVlan *def, virBufferPtr buf);
-
-#endif /* LIBVIRT_NETDEV_VLAN_CONF_H */
index 9044217fb005bbb535af0129302a6348f3f6b5a7..a2989af81e2c415f1b091b2c4b9184e06f750d46 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_NETDEV_VPORT_PROFILE_CONF_H
-# define LIBVIRT_NETDEV_VPORT_PROFILE_CONF_H
+#pragma once
 
-# include "internal.h"
-# include "virnetdevvportprofile.h"
-# include "virbuffer.h"
-# include "virxml.h"
+#include "internal.h"
+#include "virnetdevvportprofile.h"
+#include "virbuffer.h"
+#include "virxml.h"
 
 typedef enum {
     /* generate random defaults for interfaceID/interfaceID
@@ -43,6 +42,3 @@ virNetDevVPortProfileParse(xmlNodePtr node, unsigned int flags);
 int
 virNetDevVPortProfileFormat(virNetDevVPortProfilePtr virtPort,
                             virBufferPtr buf);
-
-
-#endif /* LIBVIRT_NETDEV_VPORT_PROFILE_CONF_H */
index 5410a57c67b92ec8962396db4c7129d31f88d83a..424c4b0913ba4d97255aa1e68ae2852cbb7a15a7 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_NETWORK_CONF_H
-# define LIBVIRT_NETWORK_CONF_H
-
-# define DNS_RECORD_LENGTH_SRV  (512 - 30)  /* Limit minus overhead as mentioned in RFC-2782 */
-
-# include <libxml/parser.h>
-# include <libxml/tree.h>
-# include <libxml/xpath.h>
-
-# include "internal.h"
-# include "virthread.h"
-# include "virsocketaddr.h"
-# include "virnetdevbandwidth.h"
-# include "virnetdevvportprofile.h"
-# include "virnetdevvlan.h"
-# include "virmacaddr.h"
-# include "device_conf.h"
-# include "virbitmap.h"
-# include "networkcommon_conf.h"
-# include "virobject.h"
-# include "virmacmap.h"
-# include "virenum.h"
+#pragma once
+
+#define DNS_RECORD_LENGTH_SRV  (512 - 30)  /* Limit minus overhead as mentioned in RFC-2782 */
+
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
+
+#include "internal.h"
+#include "virthread.h"
+#include "virsocketaddr.h"
+#include "virnetdevbandwidth.h"
+#include "virnetdevvportprofile.h"
+#include "virnetdevvlan.h"
+#include "virmacaddr.h"
+#include "device_conf.h"
+#include "virbitmap.h"
+#include "networkcommon_conf.h"
+#include "virobject.h"
+#include "virmacmap.h"
+#include "virenum.h"
 
 typedef enum {
     VIR_NETWORK_FORWARD_NONE   = 0,
@@ -358,19 +357,19 @@ virNetworkSetBridgeMacAddr(virNetworkDefPtr def);
 
 VIR_ENUM_DECL(virNetworkForward);
 
-# define VIR_CONNECT_LIST_NETWORKS_FILTERS_ACTIVE \
+#define VIR_CONNECT_LIST_NETWORKS_FILTERS_ACTIVE \
                 (VIR_CONNECT_LIST_NETWORKS_ACTIVE | \
                  VIR_CONNECT_LIST_NETWORKS_INACTIVE)
 
-# define VIR_CONNECT_LIST_NETWORKS_FILTERS_PERSISTENT \
+#define VIR_CONNECT_LIST_NETWORKS_FILTERS_PERSISTENT \
                 (VIR_CONNECT_LIST_NETWORKS_PERSISTENT | \
                  VIR_CONNECT_LIST_NETWORKS_TRANSIENT)
 
-# define VIR_CONNECT_LIST_NETWORKS_FILTERS_AUTOSTART \
+#define VIR_CONNECT_LIST_NETWORKS_FILTERS_AUTOSTART \
                 (VIR_CONNECT_LIST_NETWORKS_AUTOSTART | \
                  VIR_CONNECT_LIST_NETWORKS_NO_AUTOSTART)
 
-# define VIR_CONNECT_LIST_NETWORKS_FILTERS_ALL \
+#define VIR_CONNECT_LIST_NETWORKS_FILTERS_ALL \
                 (VIR_CONNECT_LIST_NETWORKS_FILTERS_ACTIVE     | \
                  VIR_CONNECT_LIST_NETWORKS_FILTERS_PERSISTENT | \
                  VIR_CONNECT_LIST_NETWORKS_FILTERS_AUTOSTART)
@@ -385,4 +384,3 @@ virNetworkDefUpdateSection(virNetworkDefPtr def,
                            unsigned int flags);  /* virNetworkUpdateFlags */
 
 VIR_ENUM_DECL(virNetworkTaint);
-#endif /* LIBVIRT_NETWORK_CONF_H */
index d3d17dd16831bf6670474e7451782ac74aae7faa..22670039708a1de7c4067dce71fee839f9267a45 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_NETWORK_EVENT_H
-# define LIBVIRT_NETWORK_EVENT_H
+#pragma once
 
-# include "internal.h"
-# include "object_event.h"
-# include "object_event_private.h"
+#include "internal.h"
+#include "object_event.h"
+#include "object_event_private.h"
 
 int
 virNetworkEventStateRegisterID(virConnectPtr conn,
@@ -55,5 +54,3 @@ virNetworkEventLifecycleNew(const char *name,
                             const unsigned char *uuid,
                             int type,
                             int detail);
-
-#endif /* LIBVIRT_NETWORK_EVENT_H */
index b6c37a5a28c9019411fe7072b147af27102e1257..b257ffdd9c4867125674cb7113c94b61ccca53d1 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_NETWORKCOMMON_CONF_H
-# define LIBVIRT_NETWORKCOMMON_CONF_H
+#pragma once
 
-# include <libxml/tree.h>
-# include <libxml/xpath.h>
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
 
-# include "internal.h"
-# include "virbuffer.h"
-# include "virsocketaddr.h"
-# include "virnetdevip.h"
+#include "internal.h"
+#include "virbuffer.h"
+#include "virsocketaddr.h"
+#include "virnetdevip.h"
 
 virNetDevIPRoutePtr
 virNetDevIPRouteCreate(const char *networkName,
@@ -49,5 +48,3 @@ virNetDevIPRouteParseXML(const char *networkName,
 int
 virNetDevIPRouteFormat(virBufferPtr buf,
                        const virNetDevIPRoute *def);
-
-#endif /* LIBVIRT_NETWORKCOMMON_CONF_H */
index 9c8f141cd9ce6c3306997e2e565ca161536138d7..3b296a10b38f36edcaeb06659359794fe1102dce 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_VIRNETWORKOBJ_H
-# define LIBVIRT_VIRNETWORKOBJ_H
+#pragma once
 
-# include "internal.h"
+#include "internal.h"
 
-# include "network_conf.h"
+#include "network_conf.h"
 
 typedef struct _virNetworkObj virNetworkObj;
 typedef virNetworkObj *virNetworkObjPtr;
@@ -220,5 +219,3 @@ virNetworkObjListNumOfNetworks(virNetworkObjListPtr nets,
 void
 virNetworkObjListPrune(virNetworkObjListPtr nets,
                        unsigned int flags);
-
-#endif /* LIBVIRT_VIRNETWORKOBJ_H */