Remove useless parenthesis and explicit cast.
Remove redundant code.
Signed-off-by: Thibaut Collet <thibaut.collet@6wind.com>
"vrf_init: failed to create the default VRF!");
exit(1);
}
"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());
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. */
}
/* Enable the default VRF. */
* occur with this implementation whereas it is not possible with
* vrf-lite).
*/
* 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. */
if_handle_vrf_change(ifp, VRF_DEFAULT);
/* Reset some zebra interface params to default values. */