]> git.puffer.fish Git - mirror/frr.git/commit
zebra: remove unnecessary check for default vrf 11831/head
authoranlan_cs <vic.lan@pica8.com>
Wed, 17 Aug 2022 07:26:24 +0000 (03:26 -0400)
committeranlan_cs <vic.lan@pica8.com>
Wed, 12 Jul 2023 09:00:27 +0000 (17:00 +0800)
commitf8d94e8a628d123f299a4f388c58c8f8b222c6c2
tree5bc78db1aa7239b0baaf906c7389cee8bc2bd208
parent30f511e63ac853465be7114322282fb5d833fa0c
zebra: remove unnecessary check for default vrf

The default vrf is generally non-NULL, except when shutdown. So, most
of the time it is not necessary to check if it is NULL, we should
remove the useless checks for it.

Searched them with exact match:
```
grep -rI "zebra_vrf_lookup_by_id(VRF_DEFAULT)" | wc -l
31
```

Signed-off-by: anlan_cs <vic.lan@pica8.com>
zebra/table_manager.c
zebra/zapi_msg.c
zebra/zebra_mpls.c
zebra/zebra_mpls_vty.c
zebra/zebra_pw.c
zebra/zebra_vty.c
zebra/zebra_vxlan.c