mirror of
https://git.proxmox.com/git/mirror_frr
synced 2026-02-01 17:19:52 +00:00
zebra/lib: code cleaning
Remove useless parenthesis and explicit cast. Remove redundant code. Signed-off-by: Thibaut Collet <thibaut.collet@6wind.com>
This commit is contained in:
parent
379eb245f6
commit
c3568c4d1a
@ -493,18 +493,14 @@ void vrf_init(int (*create)(struct vrf *), int (*enable)(struct vrf *),
|
||||
"vrf_init: failed to create the default VRF!");
|
||||
exit(1);
|
||||
}
|
||||
if (vrf_is_backend_netns())
|
||||
strlcpy(default_vrf->data.l.netns_name,
|
||||
VRF_DEFAULT_NAME, NS_NAMSIZ);
|
||||
|
||||
if (vrf_is_backend_netns()) {
|
||||
struct ns *ns;
|
||||
|
||||
strlcpy(default_vrf->data.l.netns_name,
|
||||
VRF_DEFAULT_NAME, NS_NAMSIZ);
|
||||
ns = ns_lookup(ns_get_default_id());
|
||||
ns->vrf_ctxt = (void *)default_vrf;
|
||||
default_vrf->ns_ctxt = (void *)ns;
|
||||
ns->vrf_ctxt = default_vrf;
|
||||
default_vrf->ns_ctxt = ns;
|
||||
}
|
||||
|
||||
/* Enable the default VRF. */
|
||||
|
||||
@ -733,7 +733,7 @@ void if_delete_update(struct interface *ifp)
|
||||
* occur with this implementation whereas it is not possible with
|
||||
* vrf-lite).
|
||||
*/
|
||||
if ((ifp->vrf_id) && !vrf_is_backend_netns())
|
||||
if (ifp->vrf_id && !vrf_is_backend_netns())
|
||||
if_handle_vrf_change(ifp, VRF_DEFAULT);
|
||||
|
||||
/* Reset some zebra interface params to default values. */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user