[PATCH 16/33] virfirewall: Remove impossible OOM error reporting

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

 



There's nothing that would set the 'err' field of virFirewallPtr to
ENOMEM so we can remove the checks.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/util/virfirewall.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/src/util/virfirewall.c b/src/util/virfirewall.c
index bbeb87e72d..c1b7d2268b 100644
--- a/src/util/virfirewall.c
+++ b/src/util/virfirewall.c
@@ -698,10 +698,6 @@ virFirewallApplyRule(virFirewallPtr firewall,
         if (rule->queryCB(firewall, rule->layer, (const char *const *)lines, rule->queryOpaque) < 0)
             return -1;

-        if (firewall->err == ENOMEM) {
-            virReportOOMError();
-            return -1;
-        }
         if (firewall->err) {
             virReportSystemError(firewall->err, "%s",
                                  _("Unable to create rule"));
@@ -769,11 +765,7 @@ virFirewallApply(virFirewallPtr firewall)
                        _("Failed to initialize a valid firewall backend"));
         goto cleanup;
     }
-    if (!firewall || firewall->err == ENOMEM) {
-        virReportOOMError();
-        goto cleanup;
-    }
-    if (firewall->err) {
+    if (!firewall || firewall->err) {
         virReportSystemError(firewall->err, "%s",
                              _("Unable to create rule"));
         goto cleanup;
-- 
2.29.2




[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