mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
virfirewall: Remove impossible OOM error reporting
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@redhat.com> Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
parent
2a620b1200
commit
bbc25f0d03
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user