diff options
author | Peter Krempa <pkrempa@redhat.com> | 2021-03-01 11:09:02 +0100 |
---|---|---|
committer | Peter Krempa <pkrempa@redhat.com> | 2021-03-05 15:33:34 +0100 |
commit | f9eec3714c986212c66889ff1b3886548e7445ea (patch) | |
tree | e1630e86a83d912aa2d2e95ef71ac004bc494858 /tests/commandtest.c | |
parent | ef4c325f25c59b4922cab5b045091d09a5b94635 (diff) | |
download | libvirt-f9eec3714c986212c66889ff1b3886548e7445ea.tar.gz |
commandtest: test27: Remove pointless 'cleanup' label
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Diffstat (limited to 'tests/commandtest.c')
-rw-r--r-- | tests/commandtest.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/tests/commandtest.c b/tests/commandtest.c index 524c959eba..aaf391935c 100644 --- a/tests/commandtest.c +++ b/tests/commandtest.c @@ -1041,7 +1041,6 @@ static int test27(const void *unused G_GNUC_UNUSED) g_autoptr(virCommand) cmd = virCommandNew(abs_builddir "/commandhelper"); int buf1fd; int buf2fd; - int ret = -1; size_t buflen = 1024 * 128; g_autofree char *buffer0 = NULL; g_autofree char *buffer1 = NULL; @@ -1093,29 +1092,25 @@ static int test27(const void *unused G_GNUC_UNUSED) if (virCommandRun(cmd, NULL) < 0) { printf("Cannot run child %s\n", virGetLastErrorMessage()); - goto cleanup; + return -1; } if (!outactual || !erractual) - goto cleanup; + return -1; if (STRNEQ(outactual, outexpect)) { virTestDifference(stderr, outexpect, outactual); - goto cleanup; + return -1; } if (STRNEQ(erractual, errexpect)) { virTestDifference(stderr, errexpect, erractual); - goto cleanup; + return -1; } if (checkoutput("test27") < 0) - goto cleanup; - - ret = 0; - - cleanup: + return -1; - return ret; + return 0; } |