Re: [dpdk-dev] [PATCH v1] examples/l3fwd-power: fix telemetry coverity issue

2019-07-10 Thread Thomas Monjalon
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

[dpdk-dev] [PATCH v1] examples/l3fwd-power: fix telemetry coverity issue

2019-07-10 Thread 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()