[libvirt PATCH 07/10] virNWFilterParseParamAttributes: Remove superfluous `goto`s

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx>
---
 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;
 }
 
 
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux