DPDK patches and discussions
 help / color / mirror / Atom feed
From: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
To: Hemant Agrawal <hemant.agrawal@nxp.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Doherty, Declan" <declan.doherty@intel.com>,
	"akhil.goyal@nxp.com" <akhil.goyal@nxp.com>
Subject: Re: [dpdk-dev] [PATCH] app/crypto-perf: fix uninitialized errno value
Date: Mon, 4 Sep 2017 14:56:16 +0000	[thread overview]
Message-ID: <E115CCD9D858EF4F90C690B0DCB4D8976CC15612@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <1503491044-27863-2-git-send-email-hemant.agrawal@nxp.com>



> -----Original Message-----
> From: Hemant Agrawal [mailto:hemant.agrawal@nxp.com]
> Sent: Wednesday, August 23, 2017 1:24 PM
> To: dev@dpdk.org
> Cc: Doherty, Declan <declan.doherty@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; akhil.goyal@nxp.com
> Subject: [PATCH] app/crypto-perf: fix uninitialized errno value
> 
> errno should be initialized to 0 before calling strtol
> 
> Fixes: f6cefe253cc8 ("app/crypto-perf: add range/list of sizes")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
>  app/test-crypto-perf/cperf_options_parsing.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-
> perf/cperf_options_parsing.c
> index 085aa8f..77c405c 100644
> --- a/app/test-crypto-perf/cperf_options_parsing.c
> +++ b/app/test-crypto-perf/cperf_options_parsing.c
> @@ -137,6 +137,7 @@ parse_range(const char *arg, uint32_t *min,
> uint32_t *max, uint32_t *inc)
>  	if (copy_arg == NULL)
>  		return -1;
> 
> +	errno = 0;
>  	token = strtok(copy_arg, ":");
> 
>  	/* Parse minimum value */
> --
> 2.7.4

Could you extend this fix to the parse_list function?

Thanks!
Pablo

  parent reply	other threads:[~2017-09-04 14:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-23 12:24 [dpdk-dev] [PATCH] examples/l2fwd-crypto: " Hemant Agrawal
2017-08-23 12:24 ` [dpdk-dev] [PATCH] app/crypto-perf: " Hemant Agrawal
2017-09-04 14:54   ` Rybalchenko, Kirill
2017-09-04 14:56   ` De Lara Guarch, Pablo [this message]
2017-09-05  6:03     ` Hemant Agrawal
2017-09-05  6:17   ` [dpdk-dev] [PATCH v2] " Hemant Agrawal
2017-09-05 11:25     ` De Lara Guarch, Pablo
2017-09-04 14:53 ` [dpdk-dev] [PATCH] examples/l2fwd-crypto: " De Lara Guarch, Pablo
2017-09-04 14:53 ` Rybalchenko, Kirill
2017-09-05 11:25 ` De Lara Guarch, Pablo

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=E115CCD9D858EF4F90C690B0DCB4D8976CC15612@IRSMSX108.ger.corp.intel.com \
    --to=pablo.de.lara.guarch@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.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).