[dpdk-dev] [PATCH v1] examples/l3fwd-power: fix telemetry coverity issue
Thomas Monjalon
thomas at monjalon.net
Thu Jul 11 00:00:38 CEST 2019
10/07/2019 17:26, David Hunt:
> 6 issues caught by Coverity 343465
> * Possible divide by zero on 3 lines
> * Convert to float then back to int, losing precision on 3 lines
>
> This patch modifies the code so that it only assigns calculated
> values if the divisor is > 0, otherwise sets metrics to zero.
> Also removes the un-needed round() function.
>
> Coverity issue: 343465
> Fixes: 609e79841fcf ("examples/l3fwd-power: add telemetry mode")
> Signed-off-by: David Hunt <david.hunt at intel.com>
Applied, thanks
More information about the dev
mailing list