diff options
author | Thomas Haller <thaller@redhat.com> | 2023-03-08 15:59:58 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2023-03-21 15:58:53 +0100 |
commit | b8dba58892b28b6f4a5c0520f65d92c1601ffe81 (patch) | |
tree | e8e707147568d431238ccc2d66b6444497be9f53 | |
parent | 9564fc34fd15cac943f4d1e876a9a19095f5ac15 (diff) |
l3cfg: don't return success/failure from _l3_commit_one()
It was unused anyway.
But also, what would we do with this? We are in the middle of a commit,
if something goes wrong, we cannot just abort but need to continue on
and make the best of it.
Maybe there are very specific error cases that we need to handle, but
those are not covered by a boolean return value. Instead, we might need
to take specific action.
The boolean success variable was meaningless. Drop it.
-rw-r--r-- | src/core/nm-l3cfg.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/core/nm-l3cfg.c b/src/core/nm-l3cfg.c index a4f38ca229..8e54b9d603 100644 --- a/src/core/nm-l3cfg.c +++ b/src/core/nm-l3cfg.c @@ -4723,7 +4723,7 @@ _l3_commit_mptcp(NML3Cfg *self, NML3CfgCommitType commit_type) _rp_filter_update(self, reapply); } -static gboolean +static void _l3_commit_one(NML3Cfg *self, int addr_family, NML3CfgCommitType commit_type, @@ -4740,7 +4740,6 @@ _l3_commit_one(NML3Cfg *self, NMIPRouteTableSyncMode route_table_sync; gboolean final_failure_for_temporary_not_available = FALSE; char sbuf_commit_type[50]; - gboolean success = TRUE; guint i; nm_assert(NM_IS_L3CFG(self)); @@ -4857,13 +4856,12 @@ _l3_commit_one(NML3Cfg *self, _nodev_routes_sync(self, addr_family, commit_type, routes_nodev); - if (!nm_platform_ip_route_sync(self->priv.platform, - addr_family, - self->priv.ifindex, - routes, - routes_prune, - &routes_temporary_not_available_arr)) - success = FALSE; + nm_platform_ip_route_sync(self->priv.platform, + addr_family, + self->priv.ifindex, + routes, + routes_prune, + &routes_temporary_not_available_arr); final_failure_for_temporary_not_available = FALSE; if (!_routes_temporary_not_available_update(self, @@ -4873,8 +4871,6 @@ _l3_commit_one(NML3Cfg *self, /* FIXME(l3cfg) */ (void) final_failure_for_temporary_not_available; - - return success; } static void |