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)
|
if (rule->queryCB(firewall, rule->layer, (const char *const *)lines, rule->queryOpaque) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (firewall->err == ENOMEM) {
|
|
||||||
virReportOOMError();
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (firewall->err) {
|
if (firewall->err) {
|
||||||
virReportSystemError(firewall->err, "%s",
|
virReportSystemError(firewall->err, "%s",
|
||||||
_("Unable to create rule"));
|
_("Unable to create rule"));
|
||||||
@ -769,11 +765,7 @@ virFirewallApply(virFirewallPtr firewall)
|
|||||||
_("Failed to initialize a valid firewall backend"));
|
_("Failed to initialize a valid firewall backend"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
if (!firewall || firewall->err == ENOMEM) {
|
if (!firewall || firewall->err) {
|
||||||
virReportOOMError();
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
if (firewall->err) {
|
|
||||||
virReportSystemError(firewall->err, "%s",
|
virReportSystemError(firewall->err, "%s",
|
||||||
_("Unable to create rule"));
|
_("Unable to create rule"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user