From: Thomas Monjalon <thomas@monjalon.net>
To: David Hunt <david.hunt@intel.com>
Cc: dev@dpdk.org, reshma.pattan@intel.com
Subject: Re: [dpdk-dev] [PATCH v1] examples/l3fwd-power: fix telemetry coverity issue
Date: Thu, 11 Jul 2019 00:00:38 +0200 [thread overview]
Message-ID: <74441472.B2Snk2g9C8@xps> (raw)
In-Reply-To: <20190710152620.9365-1-david.hunt@intel.com>
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@intel.com>
Applied, thanks
prev parent reply other threads:[~2019-07-10 22:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-10 15:26 David Hunt
2019-07-10 22:00 ` Thomas Monjalon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=74441472.B2Snk2g9C8@xps \
--to=thomas@monjalon.net \
--cc=david.hunt@intel.com \
--cc=dev@dpdk.org \
--cc=reshma.pattan@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).