From 7520984c1c50e615d2be7d86b4317d1fe6beff8c Mon Sep 17 00:00:00 2001 From: Tim Wiederhake Date: Wed, 14 Jul 2021 11:11:01 +0200 Subject: [PATCH] virNWFilterParseParamAttributes: Remove superfluous `goto`s MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tim Wiederhake Reviewed-by: Ján Tomko --- src/conf/nwfilter_params.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/conf/nwfilter_params.c b/src/conf/nwfilter_params.c index 63ab7e7150..35ea0256c3 100644 --- a/src/conf/nwfilter_params.c +++ b/src/conf/nwfilter_params.c @@ -710,28 +710,25 @@ virNWFilterParseParamAttributes(xmlNodePtr cur) if (nam == NULL || !isValidVarName(nam) || val == NULL || !isValidVarValue(val)) { - goto skip_entry; + cur = xmlNextElementSibling(cur); + continue; } if ((value = virHashLookup(table, nam))) { /* add value to existing value -> list */ if (virNWFilterVarValueAddValue(g_steal_pointer(&value), val) < 0) - goto err_exit; + return NULL; val = NULL; } else if ((value = virNWFilterParseVarValue(val))) { if (virHashUpdateEntry(table, nam, value) < 0) - goto err_exit; + return NULL; } value = NULL; - skip_entry: } cur = xmlNextElementSibling(cur); } return g_steal_pointer(&table); - - err_exit: - return NULL; }