]> xenbits.xensource.com Git - libvirt.git/commitdiff
src/nwfilter: use #pragma once in headers
authorJonathon Jongsma <jjongsma@redhat.com>
Tue, 18 Jun 2019 16:12:34 +0000 (11:12 -0500)
committerJán Tomko <jtomko@redhat.com>
Wed, 19 Jun 2019 15:12:30 +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/nwfilter/nwfilter_dhcpsnoop.h
src/nwfilter/nwfilter_driver.h
src/nwfilter/nwfilter_ebiptables_driver.h
src/nwfilter/nwfilter_gentech_driver.h
src/nwfilter/nwfilter_learnipaddr.h
src/nwfilter/nwfilter_tech_driver.h

index 38606bdd4195c926012d69dd7372ccaebf6734f1..2b9a87fb794cc3c982c2a891f96fa9ef606e1d4c 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_NWFILTER_DHCPSNOOP_H
-# define LIBVIRT_NWFILTER_DHCPSNOOP_H
+#pragma once
 
-# include "nwfilter_tech_driver.h"
+#include "nwfilter_tech_driver.h"
 
 int virNWFilterDHCPSnoopInit(void);
 void virNWFilterDHCPSnoopShutdown(void);
@@ -31,4 +30,3 @@ int virNWFilterDHCPSnoopReq(virNWFilterTechDriverPtr techdriver,
                             virNWFilterBindingDefPtr binding,
                             virNWFilterDriverStatePtr driver);
 void virNWFilterDHCPSnoopEnd(const char *ifname);
-#endif /* LIBVIRT_NWFILTER_DHCPSNOOP_H */
index c315a4064992885b0517430424dfef1e9554a55f..6c864dd2e37b2b9b14ccf2502e40b0bca0c55e91 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_NWFILTER_DRIVER_H
-# define LIBVIRT_NWFILTER_DRIVER_H
+#pragma once
 
-# include "nwfilter_params.h"
-# include "nwfilter_conf.h"
+#include "nwfilter_params.h"
+#include "nwfilter_conf.h"
 
 int nwfilterRegister(void);
-
-#endif /* LIBVIRT_NWFILTER_DRIVER_H */
index f7408564964c39ffab8c40a7567cb8c1589f3111..cb146f9f9717d594ad4e6e516e94c1e8236e8043 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_NWFILTER_EBIPTABLES_DRIVER_H
-# define LIBVIRT_NWFILTER_EBIPTABLES_DRIVER_H
+#pragma once
 
-# include "nwfilter_tech_driver.h"
+#include "nwfilter_tech_driver.h"
 
-# define MAX_CHAINNAME_LENGTH  32 /* see linux/netfilter_bridge/ebtables.h */
+#define MAX_CHAINNAME_LENGTH  32 /* see linux/netfilter_bridge/ebtables.h */
 
 extern virNWFilterTechDriver ebiptables_driver;
 
-# define EBIPTABLES_DRIVER_ID "ebiptables"
+#define EBIPTABLES_DRIVER_ID "ebiptables"
 
-# define IPTABLES_MAX_COMMENT_LENGTH  256
-
-#endif /* LIBVIRT_NWFILTER_EBIPTABLES_DRIVER_H */
+#define IPTABLES_MAX_COMMENT_LENGTH  256
index 945060cd2268521f490c32769339504f016a3a48..cf0560a10a9864514e3d5f84e67a3bdab664192f 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_NWFILTER_GENTECH_DRIVER_H
-# define LIBVIRT_NWFILTER_GENTECH_DRIVER_H
+#pragma once
 
-# include "virnwfilterobj.h"
-# include "virnwfilterbindingdef.h"
-# include "nwfilter_tech_driver.h"
+#include "virnwfilterobj.h"
+#include "virnwfilterbindingdef.h"
+#include "nwfilter_tech_driver.h"
 
 virNWFilterTechDriverPtr virNWFilterTechDriverForName(const char *name);
 
@@ -55,5 +54,3 @@ virHashTablePtr virNWFilterCreateVarHashmap(const char *macaddr,
 
 int virNWFilterBuildAll(virNWFilterDriverStatePtr driver,
                         bool newFilters);
-
-#endif /* LIBVIRT_NWFILTER_GENTECH_DRIVER_H */
index 117d69f4d4bae5a58eb93a0393b0a21763f2b0b7..5b9294327ffdbc52c8ba0d4b287d5fafacbde011 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_NWFILTER_LEARNIPADDR_H
-# define LIBVIRT_NWFILTER_LEARNIPADDR_H
+#pragma once
 
-# include "conf/nwfilter_params.h"
-# include "nwfilter_tech_driver.h"
-# include "virnwfilterbindingdef.h"
-# include <net/if.h>
+#include "conf/nwfilter_params.h"
+#include "nwfilter_tech_driver.h"
+#include "virnwfilterbindingdef.h"
+#include <net/if.h>
 
 enum howDetect {
   DETECT_DHCP = 1,
@@ -49,5 +48,3 @@ void virNWFilterUnlockIface(const char *ifname);
 int virNWFilterLearnInit(void);
 void virNWFilterLearnShutdown(void);
 void virNWFilterLearnThreadsTerminate(bool allowNewThreads);
-
-#endif /* LIBVIRT_NWFILTER_LEARNIPADDR_H */
index f37a0e7d5c981b471805dc3fb9ec787227e2f103..9e1e9332f9d71566950206266a208ea5b54b7daf 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_NWFILTER_TECH_DRIVER_H
-# define LIBVIRT_NWFILTER_TECH_DRIVER_H
+#pragma once
 
-# include "virnwfilterobj.h"
+#include "virnwfilterobj.h"
 
 typedef struct _virNWFilterTechDriver virNWFilterTechDriver;
 typedef virNWFilterTechDriver *virNWFilterTechDriverPtr;
@@ -90,5 +89,3 @@ struct _virNWFilterTechDriver {
     virNWFilterDropAllRules applyDropAllRules;
     virNWFilterRemoveBasicRules removeBasicRules;
 };
-
-#endif /* LIBVIRT_NWFILTER_TECH_DRIVER_H */