Again, a clean-up for which we don't have proper syntax-check.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/lxc/lxc_controller.c | 16 ++++++++--------
tests/jsontest.c | 12 ++++++------
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 4544cd0..ba44e09 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -454,7 +454,7 @@ static int virLXCControllerSetupLoopDeviceDisk(virDomainDiskDefPtr
disk)
cleanup:
VIR_FREE(loname);
if (ret < 0)
- VIR_FORCE_CLOSE(lofd);
+ VIR_FORCE_CLOSE(lofd);
return lofd;
@@ -1126,7 +1126,7 @@ static void virLXCControllerConsoleIO(int watch, int fd, int events,
void *opaqu
len = &console->fromContLen;
avail = sizeof(console->fromContBuf) - *len;
}
- reread:
+ reread:
done = read(fd, buf + *len, avail);
if (done == -1 && errno == EINTR)
goto reread;
@@ -1154,7 +1154,7 @@ static void virLXCControllerConsoleIO(int watch, int fd, int events,
void *opaqu
len = &console->fromHostLen;
}
- rewrite:
+ rewrite:
done = write(fd, buf, *len);
if (done == -1 && errno == EINTR)
goto rewrite;
@@ -1895,7 +1895,7 @@ static int virLXCControllerMoveInterfaces(virLXCControllerPtr ctrl)
virDomainHostdevCaps hdcaps = hdev->source.caps;
if (hdcaps.type != VIR_DOMAIN_HOSTDEV_CAPS_TYPE_NET)
- continue;
+ continue;
if (virNetDevSetNamespace(hdcaps.u.net.iface, ctrl->initpid) < 0)
return -1;
@@ -1985,7 +1985,7 @@ lxcCreateTty(virLXCControllerPtr ctrl, int *ttymaster,
* anything other than 0, but let's play it safe. */
if ((virAsprintf(ttyName, "/dev/pts/%d", ptyno) < 0) ||
(virAsprintf(ttyHostPath, "/%s/%s.devpts/%d", LXC_STATE_DIR,
- ctrl->def->name, ptyno) < 0)) {
+ ctrl->def->name, ptyno) < 0)) {
errno = ENOMEM;
goto cleanup;
}
@@ -2101,7 +2101,7 @@ virLXCControllerSetupDevPTS(virLXCControllerPtr ctrl)
if ((lxcContainerChown(ctrl->def, ctrl->devptmx) < 0) ||
(lxcContainerChown(ctrl->def, devpts) < 0))
- goto cleanup;
+ goto cleanup;
ret = 0;
@@ -2139,7 +2139,7 @@ virLXCControllerSetupConsoles(virLXCControllerPtr ctrl,
&ctrl->consoles[i].contFd,
&containerTTYPaths[i], &ttyHostPath) < 0) {
virReportSystemError(errno, "%s",
- _("Failed to allocate tty"));
+ _("Failed to allocate tty"));
goto cleanup;
}
@@ -2429,7 +2429,7 @@ int main(int argc, char *argv[])
int c;
c = getopt_long(argc, argv, "dn:v:p:m:c:s:h:S:",
- options, NULL);
+ options, NULL);
if (c == -1)
break;
diff --git a/tests/jsontest.c b/tests/jsontest.c
index f27943e..f070649 100644
--- a/tests/jsontest.c
+++ b/tests/jsontest.c
@@ -71,7 +71,7 @@ testJSONAddRemove(const void *data)
case 1:
if (!info->pass) {
VIR_TEST_VERBOSE("should not remove from non-object %s\n",
- info->doc);
+ info->doc);
goto cleanup;
}
break;
@@ -83,17 +83,17 @@ testJSONAddRemove(const void *data)
goto cleanup;
default:
VIR_TEST_VERBOSE("unexpected result when removing from %s\n",
- info->doc);
+ info->doc);
goto cleanup;
}
if (STRNEQ_NULLABLE(virJSONValueGetString(name), "sample")) {
VIR_TEST_VERBOSE("unexpected value after removing name: %s\n",
- NULLSTR(virJSONValueGetString(name)));
+ NULLSTR(virJSONValueGetString(name)));
goto cleanup;
}
if (virJSONValueObjectRemoveKey(json, "name", NULL)) {
VIR_TEST_VERBOSE("%s",
- "unexpected success when removing missing key\n");
+ "unexpected success when removing missing key\n");
goto cleanup;
}
if (virJSONValueObjectAppendString(json, "newname", "foo") <
0) {
@@ -139,8 +139,8 @@ mymain(void)
DO_TEST_PARSE("Simple", "{\"return\": {}, \"id\":
\"libvirt-1\"}");
DO_TEST_PARSE("NotSoSimple", "{\"QMP\":
{\"version\": {\"qemu\":"
- "{\"micro\": 91, \"minor\": 13, \"major\":
0},"
- "\"package\": \" (qemu-kvm-devel)\"},
\"capabilities\": []}}");
+ "{\"micro\": 91, \"minor\": 13,
\"major\": 0},"
+ "\"package\": \" (qemu-kvm-devel)\"},
\"capabilities\": []}}");
DO_TEST_PARSE("Harder", "{\"return\":
[{\"filename\": "
--
2.4.0