mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 19:45:21 +00:00
maint: fix comma style issues: tests, tools
Most of our code base uses space after comma but not before; fix the remaining uses before adding a syntax check. * tests/sysinfotest.c: Consistently use commas. * tests/viratomictest.c: Likewise. * tests/vircgroupmock.c: Likewise. * tools/virsh-domain.c: Likewise. * tools/virsh-volume.c: Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
5d509e9ee2
commit
57682aea36
@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* sysinfotest.c: Testcase(s) for virSysinfoRead
|
* sysinfotest.c: Testcase(s) for virSysinfoRead
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 2013 Red Hat, Inc.
|
||||||
* Copyright IBM Corp. 2012
|
* Copyright IBM Corp. 2012
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -75,7 +76,7 @@ testSysinfo(const void *data)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virSysinfoFormat(&buf,ret) < 0)
|
if (virSysinfoFormat(&buf, ret) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(sysfsActualData = virBufferCurrentContent(&buf)))
|
if (!(sysfsActualData = virBufferCurrentContent(&buf)))
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2011-2012 Red Hat, Inc.
|
* Copyright (C) 2011-2013 Red Hat, Inc.
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
@ -123,7 +123,7 @@ thread_func(void *data)
|
|||||||
bucket[idx] += d;
|
bucket[idx] += d;
|
||||||
virAtomicIntAdd(&atomic, d);
|
virAtomicIntAdd(&atomic, d);
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
SleepEx(0,0);
|
SleepEx(0, 0);
|
||||||
#else
|
#else
|
||||||
sched_yield();
|
sched_yield();
|
||||||
#endif
|
#endif
|
||||||
|
@ -399,7 +399,7 @@ static void init_sysfs(void)
|
|||||||
# define MAKE_CONTROLLER(subpath) \
|
# define MAKE_CONTROLLER(subpath) \
|
||||||
do { \
|
do { \
|
||||||
char *path; \
|
char *path; \
|
||||||
if (asprintf(&path,"%s/%s", fakesysfsdir, subpath) < 0) \
|
if (asprintf(&path, "%s/%s", fakesysfsdir, subpath) < 0)\
|
||||||
abort(); \
|
abort(); \
|
||||||
if (make_controller(path, 0755) < 0) { \
|
if (make_controller(path, 0755) < 0) { \
|
||||||
fprintf(stderr, "Cannot initialize %s\n", path); \
|
fprintf(stderr, "Cannot initialize %s\n", path); \
|
||||||
|
@ -2568,7 +2568,7 @@ cmdDomIftune(vshControl *ctl, const vshCmd *cmd)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (vshCommandOptStringReq(ctl, cmd, "inbound", &inboundStr) < 0 ||
|
if (vshCommandOptStringReq(ctl, cmd, "inbound", &inboundStr) < 0 ||
|
||||||
vshCommandOptStringReq(ctl,cmd, "outbound", &outboundStr) < 0)
|
vshCommandOptStringReq(ctl, cmd, "outbound", &outboundStr) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
memset(&inbound, 0, sizeof(inbound));
|
memset(&inbound, 0, sizeof(inbound));
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* virsh-volume.c: Commands to manage storage volume
|
* virsh-volume.c: Commands to manage storage volume
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005, 2007-2012 Red Hat, Inc.
|
* Copyright (C) 2005, 2007-2013 Red Hat, Inc.
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
@ -211,7 +211,7 @@ cmdVolCreateAs(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
if (format) {
|
if (format) {
|
||||||
virBufferAddLit(&buf, " <target>\n");
|
virBufferAddLit(&buf, " <target>\n");
|
||||||
virBufferAsprintf(&buf, " <format type='%s'/>\n",format);
|
virBufferAsprintf(&buf, " <format type='%s'/>\n", format);
|
||||||
virBufferAddLit(&buf, " </target>\n");
|
virBufferAddLit(&buf, " </target>\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -265,9 +265,10 @@ cmdVolCreateAs(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
/* Create XML for the backing store */
|
/* Create XML for the backing store */
|
||||||
virBufferAddLit(&buf, " <backingStore>\n");
|
virBufferAddLit(&buf, " <backingStore>\n");
|
||||||
virBufferAsprintf(&buf, " <path>%s</path>\n",snapshotStrVolPath);
|
virBufferAsprintf(&buf, " <path>%s</path>\n", snapshotStrVolPath);
|
||||||
if (snapshotStrFormat)
|
if (snapshotStrFormat)
|
||||||
virBufferAsprintf(&buf, " <format type='%s'/>\n",snapshotStrFormat);
|
virBufferAsprintf(&buf, " <format type='%s'/>\n",
|
||||||
|
snapshotStrFormat);
|
||||||
virBufferAddLit(&buf, " </backingStore>\n");
|
virBufferAddLit(&buf, " </backingStore>\n");
|
||||||
|
|
||||||
/* Cleanup snapshot allocations */
|
/* Cleanup snapshot allocations */
|
||||||
|
Loading…
Reference in New Issue
Block a user