[libvirt] [PATCH] filter new files through cppi, so syntax-check passes once again

Jim Meyering jim at meyering.net
Fri Mar 26 18:30:53 UTC 2010


FYI, just pushed (no semantic change):

>From d0e79bd5fa280a568d5b919fabd5f2f4dacf8f89 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering at redhat.com>
Date: Fri, 26 Mar 2010 19:29:54 +0100
Subject: [PATCH] filter new files through cppi, so syntax-check passes once again

* src/conf/nwfilter_conf.h: Indent cpp directives.
* src/conf/nwfilter_params.h: Likewise.
* src/datatypes.h: Likewise.
* src/nwfilter/nwfilter_driver.h: Likewise.
* src/nwfilter/nwfilter_ebiptables_driver.h: Likewise.
* src/nwfilter/nwfilter_gentech_driver.h: Likewise.
---
 src/conf/nwfilter_conf.h                  |   24 ++++++++++++------------
 src/conf/nwfilter_params.h                |    4 ++--
 src/datatypes.h                           |    6 +++---
 src/nwfilter/nwfilter_driver.h            |    6 +++---
 src/nwfilter/nwfilter_ebiptables_driver.h |    6 +++---
 src/nwfilter/nwfilter_gentech_driver.h    |    2 +-
 6 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/src/conf/nwfilter_conf.h b/src/conf/nwfilter_conf.h
index 5ba2f41..9b6ca40 100644
--- a/src/conf/nwfilter_conf.h
+++ b/src/conf/nwfilter_conf.h
@@ -24,15 +24,15 @@
  * Author: Stefan Berger <stefanb at us.ibm.com>
  */
 #ifndef NWFILTER_CONF_H
-#define NWFILTER_CONF_H
+# define NWFILTER_CONF_H

-#include <stdint.h>
-#include <stddef.h>
+# include <stdint.h>
+# include <stddef.h>

-#include "internal.h"
-#include "util.h"
-#include "hash.h"
-#include "xml.h"
+# include "internal.h"
+# include "util.h"
+# include "hash.h"
+# include "xml.h"

 /**
  * Chain suffix size is:
@@ -43,7 +43,7 @@
  *   terminating '0' =
  * 32-3-15-1-1 = 12
  */
-#define MAX_CHAIN_SUFFIX_SIZE	12
+# define MAX_CHAIN_SUFFIX_SIZE	12


 enum virNWFilterEntryItemFlags {
@@ -53,10 +53,10 @@ enum virNWFilterEntryItemFlags {
 };


-#define HAS_ENTRY_ITEM(data) \
+# define HAS_ENTRY_ITEM(data) \
   (((data)->flags) & NWFILTER_ENTRY_ITEM_FLAG_EXISTS)

-#define ENTRY_GET_NEG_SIGN(data) \
+# define ENTRY_GET_NEG_SIGN(data) \
   ((((data)->flags) & NWFILTER_ENTRY_ITEM_FLAG_IS_NEG) ? "!" : "")

 // datatypes appearing in rule attributes
@@ -288,7 +288,7 @@ enum virNWFilterEbtablesTableType {
 };


-#define MAX_RULE_PRIORITY  1000
+# define MAX_RULE_PRIORITY  1000


 typedef struct _virNWFilterRuleDef  virNWFilterRuleDef;
@@ -522,7 +522,7 @@ void virNWFilterConfLayerShutdown(void);
 int virNWFilterParamConfLayerInit(void);
 void virNWFilterParamConfLayerShutdown(void);

-#define virNWFilterReportError(conn, code, fmt...)                          \
+# define virNWFilterReportError(conn, code, fmt...)                          \
         virReportErrorHelper(conn, VIR_FROM_NWFILTER, code, __FILE__,       \
                                __FUNCTION__, __LINE__, fmt)

diff --git a/src/conf/nwfilter_params.h b/src/conf/nwfilter_params.h
index 7a9b1ee..5b4afba 100644
--- a/src/conf/nwfilter_params.h
+++ b/src/conf/nwfilter_params.h
@@ -20,9 +20,9 @@
  * Author: Stefan Berger <stefanb at us.ibm.com>
  */
 #ifndef NWFILTER_PARAMS_H
-#define NWFILTER_PARAMS_H
+# define NWFILTER_PARAMS_H

-#include "hash.h"
+# include "hash.h"

 typedef struct _virNWFilterHashTable virNWFilterHashTable;
 typedef virNWFilterHashTable *virNWFilterHashTablePtr;
diff --git a/src/datatypes.h b/src/datatypes.h
index c221119..4663c9c 100644
--- a/src/datatypes.h
+++ b/src/datatypes.h
@@ -126,9 +126,9 @@
  * magic value used to protect the API when pointers to network filter
  * pool structures are passed down by the users.
  */
-#define VIR_NWFILTER_MAGIC			0xDEAD7777
-#define VIR_IS_NWFILTER(obj)			((obj) && (obj)->magic==VIR_NWFILTER_MAGIC)
-#define VIR_IS_CONNECTED_NWFILTER(obj)		(VIR_IS_NWFILTER(obj) && VIR_IS_CONNECT((obj)->conn))
+# define VIR_NWFILTER_MAGIC			0xDEAD7777
+# define VIR_IS_NWFILTER(obj)			((obj) && (obj)->magic==VIR_NWFILTER_MAGIC)
+# define VIR_IS_CONNECTED_NWFILTER(obj)		(VIR_IS_NWFILTER(obj) && VIR_IS_CONNECT((obj)->conn))


 /**
diff --git a/src/nwfilter/nwfilter_driver.h b/src/nwfilter/nwfilter_driver.h
index b7d8668..3f60560 100644
--- a/src/nwfilter/nwfilter_driver.h
+++ b/src/nwfilter/nwfilter_driver.h
@@ -26,10 +26,10 @@
  */

 #ifndef __VIR_NWFILTER_DRIVER_H__
-#define __VIR_NWFILTER_DRIVER_H__
+# define __VIR_NWFILTER_DRIVER_H__

-#include "nwfilter_params.h"
-#include "nwfilter_conf.h"
+# include "nwfilter_params.h"
+# include "nwfilter_conf.h"

 int nwfilterRegister(void);

diff --git a/src/nwfilter/nwfilter_ebiptables_driver.h b/src/nwfilter/nwfilter_ebiptables_driver.h
index a036b99..ff22844 100644
--- a/src/nwfilter/nwfilter_ebiptables_driver.h
+++ b/src/nwfilter/nwfilter_ebiptables_driver.h
@@ -21,9 +21,9 @@
  * Author: Stefan Berger <stefanb at us.ibm.com>
  */
 #ifndef VIR_NWFILTER_EBTABLES_DRIVER_H__
-#define VIR_NWFILTER_EBTABLES_DRIVER_H__
+# define VIR_NWFILTER_EBTABLES_DRIVER_H__

-#define MAX_CHAINNAME_LENGTH  32 /* see linux/netfilter_bridge/ebtables.h */
+# define MAX_CHAINNAME_LENGTH  32 /* see linux/netfilter_bridge/ebtables.h */

 enum RuleType {
     RT_EBTABLES,
@@ -43,6 +43,6 @@ struct _ebiptablesRuleInst {

 extern virNWFilterTechDriver ebiptables_driver;

-#define EBIPTABLES_DRIVER_ID "ebiptables"
+# define EBIPTABLES_DRIVER_ID "ebiptables"

 #endif
diff --git a/src/nwfilter/nwfilter_gentech_driver.h b/src/nwfilter/nwfilter_gentech_driver.h
index a77d95a..6b7da71 100644
--- a/src/nwfilter/nwfilter_gentech_driver.h
+++ b/src/nwfilter/nwfilter_gentech_driver.h
@@ -21,7 +21,7 @@
  * Author: Stefan Berger <stefanb at us.ibm.com>
  */
 #ifndef __NWFILTER_GENTECH_DRIVER_H
-#define __NWFILTER_GENTECH_DRIVER_H
+# define __NWFILTER_GENTECH_DRIVER_H

 virNWFilterTechDriverPtr virNWFilterTechDriverForName(const char *name);

--
1.7.0.3.448.g82eeb




More information about the libvir-list mailing list