[PATCH 1/7] util: Rename 'no_memory' label to 'cleanup'

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

 



Let's rename the no_memory label to cleanup as the first step to remove
the OOM handling in virfirewall.c file.

Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
---
 src/util/virfirewall.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/util/virfirewall.c b/src/util/virfirewall.c
index ee72b579e4..c6a5de8842 100644
--- a/src/util/virfirewall.c
+++ b/src/util/virfirewall.c
@@ -321,7 +321,7 @@ void virFirewallFree(virFirewallPtr firewall)
         if (VIR_RESIZE_N(rule->args, \
                          rule->argsAlloc, \
                          rule->argsLen, 1) < 0) \
-            goto no_memory; \
+            goto cleanup; \
  \
         rule->args[rule->argsLen++] = g_strdup(str); \
     } while (0)
@@ -348,7 +348,7 @@ virFirewallAddRuleFullV(virFirewallPtr firewall,
 
 
     if (VIR_ALLOC(rule) < 0)
-        goto no_memory;
+        goto cleanup;
 
     rule->layer = layer;
     rule->queryCB = cb;
@@ -379,18 +379,18 @@ virFirewallAddRuleFullV(virFirewallPtr firewall,
         if (VIR_APPEND_ELEMENT_COPY(group->rollback,
                                     group->nrollback,
                                     rule) < 0)
-            goto no_memory;
+            goto cleanup;
     } else {
         if (VIR_APPEND_ELEMENT_COPY(group->action,
                                     group->naction,
                                     rule) < 0)
-            goto no_memory;
+            goto cleanup;
     }
 
 
     return rule;
 
- no_memory:
+ cleanup:
     firewall->err = ENOMEM;
     virFirewallRuleFree(rule);
     return NULL;
@@ -494,7 +494,7 @@ void virFirewallRuleAddArg(virFirewallPtr firewall,
 
     return;
 
- no_memory:
+ cleanup:
     firewall->err = ENOMEM;
 }
 
@@ -516,7 +516,7 @@ void virFirewallRuleAddArgFormat(virFirewallPtr firewall,
 
     return;
 
- no_memory:
+ cleanup:
     firewall->err = ENOMEM;
 }
 
@@ -534,7 +534,7 @@ void virFirewallRuleAddArgSet(virFirewallPtr firewall,
 
     return;
 
- no_memory:
+ cleanup:
     firewall->err = ENOMEM;
 }
 
@@ -557,7 +557,7 @@ void virFirewallRuleAddArgList(virFirewallPtr firewall,
 
     return;
 
- no_memory:
+ cleanup:
     firewall->err = ENOMEM;
     va_end(list);
 }
-- 
2.24.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[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