diff options
author | Steven Luong <sluong@cisco.com> | 2021-03-03 16:56:19 -0800 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2021-03-05 10:50:48 +0000 |
commit | d9360174483d3716886fa42f1b7041fc0cc79ef9 (patch) | |
tree | ecb7c4201b12c1c4d6792ed4f04c8b915241e7ec /src/vnet/l2 | |
parent | 60c397711a4d0f694491945ccb64d3da3049557a (diff) |
l2: coverity woe in l2_rw_mod_entry
Coverity complains that the statement
if (!e)
return -1;
is never true and is logically dead code in the subject function. It is
right. e is assigned in both the if and else statementes immediately above
and can never be null.
Type: fix
Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ic2d0e76eff696ee689a68a07913876dcecf5c647
Diffstat (limited to 'src/vnet/l2')
-rw-r--r-- | src/vnet/l2/l2_rw.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/vnet/l2/l2_rw.c b/src/vnet/l2/l2_rw.c index a7c95fe1a77..b6de2faffc5 100644 --- a/src/vnet/l2/l2_rw.c +++ b/src/vnet/l2/l2_rw.c @@ -326,9 +326,6 @@ l2_rw_mod_entry (u32 * index, *index = e - rw->entries; } - if (!e) - return -1; - if (is_del) { pool_put (rw->entries, e); |