diff options
author | Dave Barach <dave@barachs.net> | 2016-08-04 18:58:05 -0400 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2016-08-05 13:21:59 +0000 |
commit | 56faee837281c7f9c28aa40dbf0f6e4620b76be8 (patch) | |
tree | 9fc45d3dca2bda5ff6c168fd943a9a6a55d0d2ab /vppinfra/vppinfra/phash.c | |
parent | 91c7d387fbfdf109f422c56ec5a4a21c9bbd9d02 (diff) |
VPP-189 Clean up more coverity warnings
Change-Id: I1b971ab326dc334a4743fd7d4184cef106b0523d
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'vppinfra/vppinfra/phash.c')
-rw-r--r-- | vppinfra/vppinfra/phash.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vppinfra/vppinfra/phash.c b/vppinfra/vppinfra/phash.c index c883fac871e..a104e64e1be 100644 --- a/vppinfra/vppinfra/phash.c +++ b/vppinfra/vppinfra/phash.c @@ -662,7 +662,12 @@ static void guess_initial_parameters (phash_main_t * pm) a_max = 1; b_max = 1; case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: - a_max = is_minimal ? s_max / 2 : s_max; + /* + * Was: a_max = is_minimal ? s_max / 2 : s_max; + * However, we know that is_minimal must be true, so the + * if-arm of the ternary expression is always executed. + */ + a_max = s_max/2; b_max = s_max/2; break; case 9: case 10: case 11: case 12: case 13: |