diff options
author | Dave Barach <dave@barachs.net> | 2020-02-11 10:29:13 -0500 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2020-02-11 23:11:58 +0000 |
commit | a6ef36b2c25de47824a1b45e147ab2fbf67c3a33 (patch) | |
tree | 01f29603e11b22763a1a539db10975171ad29f00 /src/vnet/interface.c | |
parent | 44476c6b271bdebb7458590398b5f140c9a7d353 (diff) |
misc: fix coverity warnings
Type: fix
Ticket: VPP-1837
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I6b1ea13fc83460bf4ee75cb9249d83dddaa64ded
Diffstat (limited to 'src/vnet/interface.c')
-rw-r--r-- | src/vnet/interface.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/vnet/interface.c b/src/vnet/interface.c index 5ee3a74fe0b..dfefdbac921 100644 --- a/src/vnet/interface.c +++ b/src/vnet/interface.c @@ -200,8 +200,14 @@ unserialize_vnet_interface_state (serialize_main_t * m, va_list * va) pool_foreach (hif, im->hw_interfaces, ({ unserialize_cstring (m, &class_name); p = hash_get_mem (im->hw_interface_class_by_name, class_name); - ASSERT (p != 0); - error = vnet_hw_interface_set_class_helper (vnm, hif->hw_if_index, p[0], /* redistribute */ 0); + if (p) + { + error = vnet_hw_interface_set_class_helper + (vnm, hif->hw_if_index, p[0], /* redistribute */ 0); + } + else + error = clib_error_return (0, "hw class %s AWOL?", class_name); + if (error) clib_error_report (error); vec_free (class_name); |