diff options
author | Dave Barach <dave@barachs.net> | 2016-10-12 17:32:39 -0400 |
---|---|---|
committer | Dave Barach <dave@barachs.net> | 2016-10-12 17:32:56 -0400 |
commit | 1946a12a52deddfb501d2bdf320ff280cb42a076 (patch) | |
tree | 0301cf76c49f81ed4a58e26587f24bddfdac898b /vpp/vpp-api | |
parent | 1e66d5c54b81b8d6290153f1b3c2b021c4b62fad (diff) |
Fix coverity warnings, VPP-486
Change-Id: I7a14d9a28514cdb49f65fab1b120b53239fed7e3
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'vpp/vpp-api')
-rw-r--r-- | vpp/vpp-api/api.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vpp/vpp-api/api.c b/vpp/vpp-api/api.c index 84e4d5d5..3840b820 100644 --- a/vpp/vpp-api/api.c +++ b/vpp/vpp-api/api.c @@ -1597,6 +1597,14 @@ static void /* Detect the set of worker threads */ uword *p = hash_get_mem (tm->thread_registrations_by_name, "workers"); + + if (p == 0) + { + clib_warning ("worker thread registration AWOL !!"); + rv = VNET_API_ERROR_INVALID_VALUE_2; + goto done; + } + vlib_thread_registration_t *tr = (vlib_thread_registration_t *) p[0]; int worker_thread_first = tr->first_index; int worker_thread_count = tr->count; |