[libvirt] [PATCH] Fix spacing around commas

Michal Privoznik mprivozn at redhat.com
Fri Aug 22 13:14:16 UTC 2014


On some places in the libvirt code we have:

  f(a,z)

instead of

  f(a, z)

This trivial patch fixes couple of such occurrences.

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---

Pushed under trivial rule.

 HACKING                             |  2 +-
 docs/hacking.html.in                |  2 +-
 examples/object-events/event-test.c |  2 +-
 src/driver.h                        |  2 +-
 src/internal.h                      | 26 +++++++++++++-------------
 src/locking/lock_driver_lockd.c     |  2 +-
 src/locking/lock_driver_sanlock.c   |  2 +-
 src/lxc/lxc_conf.c                  |  2 +-
 src/nwfilter/nwfilter_dhcpsnoop.c   |  2 +-
 src/qemu/qemu_conf.c                |  2 +-
 src/storage/parthelper.c            |  2 +-
 11 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/HACKING b/HACKING
index 4cf2906..88a4286 100644
--- a/HACKING
+++ b/HACKING
@@ -477,7 +477,7 @@ Use parenthesis when checking if a macro is defined, and use indentation to
 track nesting:
 
   #if defined(HAVE_POSIX_FALLOCATE) && !defined(HAVE_FALLOCATE)
-  # define fallocate(a,ignored,b,c) posix_fallocate(a,b,c)
+  # define fallocate(a, ignored, b, c) posix_fallocate(a, b, c)
   #endif
 
 
diff --git a/docs/hacking.html.in b/docs/hacking.html.in
index 6a92f46..bc76542 100644
--- a/docs/hacking.html.in
+++ b/docs/hacking.html.in
@@ -614,7 +614,7 @@
     </p>
 <pre>
   #if defined(HAVE_POSIX_FALLOCATE) && !defined(HAVE_FALLOCATE)
-  # define fallocate(a,ignored,b,c) posix_fallocate(a,b,c)
+  # define fallocate(a, ignored, b, c) posix_fallocate(a, b, c)
   #endif
 </pre>
 
diff --git a/examples/object-events/event-test.c b/examples/object-events/event-test.c
index 2a5a83b..d6cfe46 100644
--- a/examples/object-events/event-test.c
+++ b/examples/object-events/event-test.c
@@ -10,7 +10,7 @@
 #include <libvirt/virterror.h>
 
 #define VIR_DEBUG(fmt) printf("%s:%d: " fmt "\n", __func__, __LINE__)
-#define STREQ(a,b) (strcmp(a,b) == 0)
+#define STREQ(a, b) (strcmp(a, b) == 0)
 
 #ifndef ATTRIBUTE_UNUSED
 # define ATTRIBUTE_UNUSED __attribute__((__unused__))
diff --git a/src/driver.h b/src/driver.h
index 158df79..ba7c1fc 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -78,7 +78,7 @@ typedef enum {
  *   != 0  Feature is supported.
  *   0     Feature is not supported.
  */
-# define VIR_DRV_SUPPORTS_FEATURE(drv,conn,feature)                     \
+# define VIR_DRV_SUPPORTS_FEATURE(drv, conn, feature)                   \
     ((drv)->connectSupportsFeature ?                                    \
         (drv)->connectSupportsFeature((conn), (feature)) > 0 : 0)
 
diff --git a/src/internal.h b/src/internal.h
index d355344..f6a88b2 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -78,16 +78,16 @@
 # endif
 
 /* String equality tests, suggested by Jim Meyering. */
-# define STREQ(a,b) (strcmp(a,b) == 0)
-# define STRCASEEQ(a,b) (c_strcasecmp(a,b) == 0)
-# define STRNEQ(a,b) (strcmp(a,b) != 0)
-# define STRCASENEQ(a,b) (c_strcasecmp(a,b) != 0)
-# define STREQLEN(a,b,n) (strncmp(a,b,n) == 0)
-# define STRCASEEQLEN(a,b,n) (c_strncasecmp(a,b,n) == 0)
-# define STRNEQLEN(a,b,n) (strncmp(a,b,n) != 0)
-# define STRCASENEQLEN(a,b,n) (c_strncasecmp(a,b,n) != 0)
-# define STRPREFIX(a,b) (strncmp(a,b,strlen(b)) == 0)
-# define STRSKIP(a,b) (STRPREFIX(a,b) ? (a) + strlen(b) : NULL)
+# define STREQ(a, b) (strcmp(a, b) == 0)
+# define STRCASEEQ(a, b) (c_strcasecmp(a, b) == 0)
+# define STRNEQ(a, b) (strcmp(a, b) != 0)
+# define STRCASENEQ(a, b) (c_strcasecmp(a, b) != 0)
+# define STREQLEN(a, b, n) (strncmp(a, b, n) == 0)
+# define STRCASEEQLEN(a, b, n) (c_strncasecmp(a, b, n) == 0)
+# define STRNEQLEN(a, b, n) (strncmp(a, b, n) != 0)
+# define STRCASENEQLEN(a, b, n) (c_strncasecmp(a, b, n) != 0)
+# define STRPREFIX(a, b) (strncmp(a, b, strlen(b)) == 0)
+# define STRSKIP(a, b) (STRPREFIX(a, b) ? (a) + strlen(b) : NULL)
 
 # define STREQ_NULLABLE(a, b)                           \
     ((a) ? (b) && STREQ((a) ? (a) : "", (b) ? (b) : "") : !(b))
@@ -109,7 +109,7 @@
 #    define __GNUC_PREREQ(maj, min)                                        \
     ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
 #   else
-#    define __GNUC_PREREQ(maj,min) 0
+#    define __GNUC_PREREQ(maj, min) 0
 #   endif
 
 /* Work around broken limits.h on debian etch */
@@ -162,10 +162,10 @@
  */
 #  ifndef ATTRIBUTE_FMT_PRINTF
 #   if __GNUC_PREREQ (4, 4)
-#    define ATTRIBUTE_FMT_PRINTF(fmtpos,argpos) \
+#    define ATTRIBUTE_FMT_PRINTF(fmtpos, argpos) \
     __attribute__((__format__ (__gnu_printf__, fmtpos, argpos)))
 #   else
-#    define ATTRIBUTE_FMT_PRINTF(fmtpos,argpos) \
+#    define ATTRIBUTE_FMT_PRINTF(fmtpos, argpos) \
     __attribute__((__format__ (__printf__, fmtpos, argpos)))
 #   endif
 #  endif
diff --git a/src/locking/lock_driver_lockd.c b/src/locking/lock_driver_lockd.c
index 367d0ce..0a40e94 100644
--- a/src/locking/lock_driver_lockd.c
+++ b/src/locking/lock_driver_lockd.c
@@ -99,7 +99,7 @@ static int virLockManagerLockDaemonLoadConfig(const char *configFile)
     if (!(conf = virConfReadFile(configFile, 0)))
         return -1;
 
-#define CHECK_TYPE(name,typ) if (p && p->type != (typ)) {               \
+#define CHECK_TYPE(name, typ) if (p && p->type != (typ)) {              \
         virReportError(VIR_ERR_INTERNAL_ERROR,                          \
                        "%s: %s: expected type " #typ,                   \
                        configFile, (name));                             \
diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c
index ea43051..aade437 100644
--- a/src/locking/lock_driver_sanlock.c
+++ b/src/locking/lock_driver_sanlock.c
@@ -118,7 +118,7 @@ static int virLockManagerSanlockLoadConfig(const char *configFile)
     if (!(conf = virConfReadFile(configFile, 0)))
         return -1;
 
-#define CHECK_TYPE(name,typ) if (p && p->type != (typ)) {               \
+#define CHECK_TYPE(name, typ) if (p && p->type != (typ)) {              \
         virReportError(VIR_ERR_INTERNAL_ERROR,                          \
                        "%s: %s: expected type " #typ,                   \
                        configFile, (name));                             \
diff --git a/src/lxc/lxc_conf.c b/src/lxc/lxc_conf.c
index b5fd3cb..17df7a8 100644
--- a/src/lxc/lxc_conf.c
+++ b/src/lxc/lxc_conf.c
@@ -259,7 +259,7 @@ virLXCLoadDriverConfig(virLXCDriverConfigPtr cfg,
     if (!conf)
         goto done;
 
-#define CHECK_TYPE(name,typ) if (p && p->type != (typ)) {               \
+#define CHECK_TYPE(name, typ) if (p && p->type != (typ)) {              \
         virReportError(VIR_ERR_INTERNAL_ERROR,                          \
                        "%s: %s: expected type " #typ,                   \
                        filename, (name));                               \
diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/src/nwfilter/nwfilter_dhcpsnoop.c
index bfd0553..a2f58ba 100644
--- a/src/nwfilter/nwfilter_dhcpsnoop.c
+++ b/src/nwfilter/nwfilter_dhcpsnoop.c
@@ -1229,7 +1229,7 @@ virNWFilterSnoopRateLimit(virNWFilterSnoopRateLimitConfPtr rl)
 {
     time_t now = time(0);
     int diff;
-# define IN_BURST(n,b) ((n)-(b) <= 1) /* bursts span 2 discrete seconds */
+# define IN_BURST(n, b) ((n)-(b) <= 1) /* bursts span 2 discrete seconds */
 
     if (rl->prev != now && !IN_BURST(now, rl->burst)) {
         rl->prev = now;
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 25e6d5e..e2ec54f 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -347,7 +347,7 @@ int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg,
     if (!(conf = virConfReadFile(filename, 0)))
         goto cleanup;
 
-#define CHECK_TYPE(name,typ)                          \
+#define CHECK_TYPE(name, typ)                         \
     if (p && p->type != (typ)) {                      \
         virReportError(VIR_ERR_INTERNAL_ERROR,        \
                        "%s: %s: expected type " #typ, \
diff --git a/src/storage/parthelper.c b/src/storage/parthelper.c
index c04f1bd..84e7ba0 100644
--- a/src/storage/parthelper.c
+++ b/src/storage/parthelper.c
@@ -48,7 +48,7 @@
 #include "virstring.h"
 
 /* we don't need to include the full internal.h just for this */
-#define STREQ(a,b) (strcmp(a,b) == 0)
+#define STREQ(a, b) (strcmp(a, b) == 0)
 
 /* Make the comparisons below fail if your parted headers
    are so old that they lack the definition.  */
-- 
1.8.5.5




More information about the libvir-list mailing list