[libvirt PATCH 06/38] virNWFilterCreateVarsFrom: Remove superfluous `goto`s

Tim Wiederhake twiederh at redhat.com
Thu Jul 22 07:49:58 UTC 2021


Signed-off-by: Tim Wiederhake <twiederh at redhat.com>
---
 src/nwfilter/nwfilter_gentech_driver.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/nwfilter/nwfilter_gentech_driver.c b/src/nwfilter/nwfilter_gentech_driver.c
index d17be401e6..a425285e8c 100644
--- a/src/nwfilter/nwfilter_gentech_driver.c
+++ b/src/nwfilter/nwfilter_gentech_driver.c
@@ -202,15 +202,12 @@ virNWFilterCreateVarsFrom(GHashTable *vars1,
     g_autoptr(GHashTable) res = virHashNew(virNWFilterVarValueHashFree);
 
     if (virNWFilterHashTablePutAll(vars1, res) < 0)
-        goto error;
+        return NULL;
 
     if (virNWFilterHashTablePutAll(vars2, res) < 0)
-        goto error;
+        return NULL;
 
     return g_steal_pointer(&res);
-
- error:
-    return NULL;
 }
 
 
-- 
2.31.1




More information about the libvir-list mailing list