]> git.puffer.fish Git - matthieu/frr.git/commit
zebra: use "assert" instead of unnecessary check
authoranlan_cs <vic.lan@pica8.com>
Sun, 6 Feb 2022 03:59:09 +0000 (22:59 -0500)
committeranlan_cs <vic.lan@pica8.com>
Sat, 12 Mar 2022 04:44:47 +0000 (12:44 +0800)
commitdf44783078d69db1a154b7a619719340da00621b
tree6a04800e7c78c268500dbe3f144b2a756504e81f
parent44f1c44c2d9a9f975e586bebd5fc01d2148b9182
zebra: use "assert" instead of unnecessary check

Since `zvni_map_to_svi_ns()` is used to find and return one specific interface
based on passed attributes of SVI, so the two parameters `in_param` and `p_ifp`
must not be NULL.

Passing NULL `p_ifp` makes no sense, so the check `if (p_ifp)` is
unnecessary.

So use `assert` to ensure the two parameters, and remove that unnecessary check.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
zebra/zebra_vxlan.c