[PATCH 32/32] eliminate unnecessary labels and ret variables

Ján Tomko jtomko at redhat.com
Wed Jul 8 12:11:34 UTC 2020


On a Sunday in 2020, Laine Stump wrote:
>after making all virFirewall objects use g_autoptr().
>
>Signed-off-by: Laine Stump <laine at redhat.com>
>---
> src/network/bridge_driver_linux.c         | 27 +++++++------------
> src/nwfilter/nwfilter_ebiptables_driver.c | 32 +++++++----------------
> src/util/virebtables.c                    | 16 ++----------
> src/util/viriptables.c                    |  8 ++----
> 4 files changed, 22 insertions(+), 61 deletions(-)
>

[...]

>diff --git a/src/util/virebtables.c b/src/util/virebtables.c
>index 69483f35ec..610c399414 100644
>--- a/src/util/virebtables.c
>+++ b/src/util/virebtables.c

[...]

>@@ -128,12 +121,7 @@ ebtablesForwardAllowIn(ebtablesContext *ctx,
>                        "--jump", "ACCEPT",
>                        NULL);
>
>-    if (virFirewallApply(fw) < 0)
>-        goto cleanup;
>-
>-    ret = 0;
>- cleanup:
>-    return ret;
>+    return  virFirewallApply(fw);

Double space.

> }
>
> /**

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200708/a17eadff/attachment-0001.sig>


More information about the libvir-list mailing list