aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/bihash_template.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2017-01-18 10:23:22 -0500
committerDave Barach <dave@barachs.net>2017-01-18 10:32:15 -0500
commit8f544964a3df144a441b136c2a01427eca731eea (patch)
tree90f9eca233c2b12c8d1f96c0a27e617053c6e99e /src/vppinfra/bihash_template.c
parentd8e478762919b5d40529d72edd3ff8a85fbe9800 (diff)
Fix coverity warnings, VPP-608
Change-Id: Ib0144ba3a9a09971d3946c932e8fed6d5c1ad278 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vppinfra/bihash_template.c')
-rw-r--r--src/vppinfra/bihash_template.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/vppinfra/bihash_template.c b/src/vppinfra/bihash_template.c
index 7c817a20..d8b97b5f 100644
--- a/src/vppinfra/bihash_template.c
+++ b/src/vppinfra/bihash_template.c
@@ -199,7 +199,7 @@ BV (split_and_rehash_linear)
/* Find a free slot in the new linear scan bucket */
for (; j < new_length; j++)
{
- /* Old value in use? Forget it. */
+ /* Old value not in use? Forget it. */
if (BV (clib_bihash_is_free) (&(old_values->kvp[i])))
goto doublebreak;
@@ -212,11 +212,12 @@ BV (split_and_rehash_linear)
j++;
goto doublebreak;
}
- /* This should never happen... */
- clib_warning ("BUG: linear rehash failed!");
- BV (value_free) (h, new_values);
- return 0;
}
+ /* This should never happen... */
+ clib_warning ("BUG: linear rehash failed!");
+ BV (value_free) (h, new_values);
+ return 0;
+
doublebreak:;
}
return new_values;