mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 11:01:19 +00:00
Fix spacing around commas
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@redhat.com>
This commit is contained in:
parent
24b1bad37f
commit
66eaa887e9
2
HACKING
2
HACKING
@ -477,7 +477,7 @@ Use parenthesis when checking if a macro is defined, and use indentation to
|
|||||||
track nesting:
|
track nesting:
|
||||||
|
|
||||||
#if defined(HAVE_POSIX_FALLOCATE) && !defined(HAVE_FALLOCATE)
|
#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
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -614,7 +614,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
#if defined(HAVE_POSIX_FALLOCATE) && !defined(HAVE_FALLOCATE)
|
#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
|
#endif
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include <libvirt/virterror.h>
|
#include <libvirt/virterror.h>
|
||||||
|
|
||||||
#define VIR_DEBUG(fmt) printf("%s:%d: " fmt "\n", __func__, __LINE__)
|
#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
|
#ifndef ATTRIBUTE_UNUSED
|
||||||
# define ATTRIBUTE_UNUSED __attribute__((__unused__))
|
# define ATTRIBUTE_UNUSED __attribute__((__unused__))
|
||||||
|
@ -78,7 +78,7 @@ typedef enum {
|
|||||||
* != 0 Feature is supported.
|
* != 0 Feature is supported.
|
||||||
* 0 Feature is not 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 ? \
|
||||||
(drv)->connectSupportsFeature((conn), (feature)) > 0 : 0)
|
(drv)->connectSupportsFeature((conn), (feature)) > 0 : 0)
|
||||||
|
|
||||||
|
@ -78,16 +78,16 @@
|
|||||||
# endif
|
# endif
|
||||||
|
|
||||||
/* String equality tests, suggested by Jim Meyering. */
|
/* String equality tests, suggested by Jim Meyering. */
|
||||||
# define STREQ(a,b) (strcmp(a,b) == 0)
|
# define STREQ(a, b) (strcmp(a, b) == 0)
|
||||||
# define STRCASEEQ(a,b) (c_strcasecmp(a,b) == 0)
|
# define STRCASEEQ(a, b) (c_strcasecmp(a, b) == 0)
|
||||||
# define STRNEQ(a,b) (strcmp(a,b) != 0)
|
# define STRNEQ(a, b) (strcmp(a, b) != 0)
|
||||||
# define STRCASENEQ(a,b) (c_strcasecmp(a,b) != 0)
|
# define STRCASENEQ(a, b) (c_strcasecmp(a, b) != 0)
|
||||||
# define STREQLEN(a,b,n) (strncmp(a,b,n) == 0)
|
# define STREQLEN(a, b, n) (strncmp(a, b, n) == 0)
|
||||||
# define STRCASEEQLEN(a,b,n) (c_strncasecmp(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 STRNEQLEN(a, b, n) (strncmp(a, b, n) != 0)
|
||||||
# define STRCASENEQLEN(a,b,n) (c_strncasecmp(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 STRPREFIX(a, b) (strncmp(a, b, strlen(b)) == 0)
|
||||||
# define STRSKIP(a,b) (STRPREFIX(a,b) ? (a) + strlen(b) : NULL)
|
# define STRSKIP(a, b) (STRPREFIX(a, b) ? (a) + strlen(b) : NULL)
|
||||||
|
|
||||||
# define STREQ_NULLABLE(a, b) \
|
# define STREQ_NULLABLE(a, b) \
|
||||||
((a) ? (b) && STREQ((a) ? (a) : "", (b) ? (b) : "") : !(b))
|
((a) ? (b) && STREQ((a) ? (a) : "", (b) ? (b) : "") : !(b))
|
||||||
@ -109,7 +109,7 @@
|
|||||||
# define __GNUC_PREREQ(maj, min) \
|
# define __GNUC_PREREQ(maj, min) \
|
||||||
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
|
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
|
||||||
# else
|
# else
|
||||||
# define __GNUC_PREREQ(maj,min) 0
|
# define __GNUC_PREREQ(maj, min) 0
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/* Work around broken limits.h on debian etch */
|
/* Work around broken limits.h on debian etch */
|
||||||
@ -162,10 +162,10 @@
|
|||||||
*/
|
*/
|
||||||
# ifndef ATTRIBUTE_FMT_PRINTF
|
# ifndef ATTRIBUTE_FMT_PRINTF
|
||||||
# if __GNUC_PREREQ (4, 4)
|
# if __GNUC_PREREQ (4, 4)
|
||||||
# define ATTRIBUTE_FMT_PRINTF(fmtpos,argpos) \
|
# define ATTRIBUTE_FMT_PRINTF(fmtpos, argpos) \
|
||||||
__attribute__((__format__ (__gnu_printf__, fmtpos, argpos)))
|
__attribute__((__format__ (__gnu_printf__, fmtpos, argpos)))
|
||||||
# else
|
# else
|
||||||
# define ATTRIBUTE_FMT_PRINTF(fmtpos,argpos) \
|
# define ATTRIBUTE_FMT_PRINTF(fmtpos, argpos) \
|
||||||
__attribute__((__format__ (__printf__, fmtpos, argpos)))
|
__attribute__((__format__ (__printf__, fmtpos, argpos)))
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
@ -99,7 +99,7 @@ static int virLockManagerLockDaemonLoadConfig(const char *configFile)
|
|||||||
if (!(conf = virConfReadFile(configFile, 0)))
|
if (!(conf = virConfReadFile(configFile, 0)))
|
||||||
return -1;
|
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, \
|
virReportError(VIR_ERR_INTERNAL_ERROR, \
|
||||||
"%s: %s: expected type " #typ, \
|
"%s: %s: expected type " #typ, \
|
||||||
configFile, (name)); \
|
configFile, (name)); \
|
||||||
|
@ -118,7 +118,7 @@ static int virLockManagerSanlockLoadConfig(const char *configFile)
|
|||||||
if (!(conf = virConfReadFile(configFile, 0)))
|
if (!(conf = virConfReadFile(configFile, 0)))
|
||||||
return -1;
|
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, \
|
virReportError(VIR_ERR_INTERNAL_ERROR, \
|
||||||
"%s: %s: expected type " #typ, \
|
"%s: %s: expected type " #typ, \
|
||||||
configFile, (name)); \
|
configFile, (name)); \
|
||||||
|
@ -259,7 +259,7 @@ virLXCLoadDriverConfig(virLXCDriverConfigPtr cfg,
|
|||||||
if (!conf)
|
if (!conf)
|
||||||
goto done;
|
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, \
|
virReportError(VIR_ERR_INTERNAL_ERROR, \
|
||||||
"%s: %s: expected type " #typ, \
|
"%s: %s: expected type " #typ, \
|
||||||
filename, (name)); \
|
filename, (name)); \
|
||||||
|
@ -1229,7 +1229,7 @@ virNWFilterSnoopRateLimit(virNWFilterSnoopRateLimitConfPtr rl)
|
|||||||
{
|
{
|
||||||
time_t now = time(0);
|
time_t now = time(0);
|
||||||
int diff;
|
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)) {
|
if (rl->prev != now && !IN_BURST(now, rl->burst)) {
|
||||||
rl->prev = now;
|
rl->prev = now;
|
||||||
|
@ -347,7 +347,7 @@ int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg,
|
|||||||
if (!(conf = virConfReadFile(filename, 0)))
|
if (!(conf = virConfReadFile(filename, 0)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
#define CHECK_TYPE(name,typ) \
|
#define CHECK_TYPE(name, typ) \
|
||||||
if (p && p->type != (typ)) { \
|
if (p && p->type != (typ)) { \
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, \
|
virReportError(VIR_ERR_INTERNAL_ERROR, \
|
||||||
"%s: %s: expected type " #typ, \
|
"%s: %s: expected type " #typ, \
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
#include "virstring.h"
|
#include "virstring.h"
|
||||||
|
|
||||||
/* we don't need to include the full internal.h just for this */
|
/* 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
|
/* Make the comparisons below fail if your parted headers
|
||||||
are so old that they lack the definition. */
|
are so old that they lack the definition. */
|
||||||
|
Loading…
Reference in New Issue
Block a user