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(a)redhat.com>
---
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