From 54370ad9d95fed14b8fd68d879f503acf2f1f66f Mon Sep 17 00:00:00 2001 From: Daniel Henrique Barboza Date: Mon, 6 Jan 2020 18:57:31 -0300 Subject: [PATCH] nwfilter: remove unneeded labels Signed-off-by: Daniel Henrique Barboza Reviewed-by: Erik Skultety --- src/nwfilter/nwfilter_ebiptables_driver.c | 11 ++++------- src/nwfilter/nwfilter_learnipaddr.c | 3 +-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/nwfilter/nwfilter_ebiptables_driver.c b/src/nwfilter/nwfilter_ebiptables_driver.c index 0cf8149193..eec1414023 100644 --- a/src/nwfilter/nwfilter_ebiptables_driver.c +++ b/src/nwfilter/nwfilter_ebiptables_driver.c @@ -1046,7 +1046,7 @@ iptablesHandlePortData(virFirewallPtr fw, if (printDataType(vars, portstr, sizeof(portstr), &portData->dataSrcPortStart) < 0) - goto err_exit; + return -1; if (ENTRY_WANT_NEG_SIGN(&portData->dataSrcPortStart)) virFirewallRuleAddArg(fw, fwrule, "!"); @@ -1056,7 +1056,7 @@ iptablesHandlePortData(virFirewallPtr fw, if (printDataType(vars, portstralt, sizeof(portstralt), &portData->dataSrcPortEnd) < 0) - goto err_exit; + return -1; virFirewallRuleAddArgFormat(fw, fwrule, "%s:%s", portstr, portstralt); @@ -1069,7 +1069,7 @@ iptablesHandlePortData(virFirewallPtr fw, if (printDataType(vars, portstr, sizeof(portstr), &portData->dataDstPortStart) < 0) - goto err_exit; + return -1; if (ENTRY_WANT_NEG_SIGN(&portData->dataDstPortStart)) virFirewallRuleAddArg(fw, fwrule, "!"); @@ -1079,7 +1079,7 @@ iptablesHandlePortData(virFirewallPtr fw, if (printDataType(vars, portstralt, sizeof(portstralt), &portData->dataDstPortEnd) < 0) - goto err_exit; + return -1; virFirewallRuleAddArgFormat(fw, fwrule, "%s:%s", portstr, portstralt); @@ -1089,9 +1089,6 @@ iptablesHandlePortData(virFirewallPtr fw, } return 0; - - err_exit: - return -1; } diff --git a/src/nwfilter/nwfilter_learnipaddr.c b/src/nwfilter/nwfilter_learnipaddr.c index 9b4fab7ffb..46ef65401c 100644 --- a/src/nwfilter/nwfilter_learnipaddr.c +++ b/src/nwfilter/nwfilter_learnipaddr.c @@ -725,7 +725,7 @@ virNWFilterLearnIPAddress(virNWFilterTechDriverPtr techdriver, } if (VIR_ALLOC(req) < 0) - goto err_no_req; + return -1; if (!(req->binding = virNWFilterBindingDefCopy(binding))) goto err_free_req; @@ -752,7 +752,6 @@ virNWFilterLearnIPAddress(virNWFilterTechDriverPtr techdriver, virNWFilterDeregisterLearnReq(ifindex); err_free_req: virNWFilterIPAddrLearnReqFree(req); - err_no_req: return -1; }