mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-07 03:48:09 +02:00
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.
This commit is contained in:
parent
9564fc34fd
commit
b8dba58892
1 changed files with 7 additions and 11 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue