DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Churchill Khangar <churchill.khangar@intel.com>
Cc: dev <dev@dpdk.org>,
	Cristian Dumitrescu <cristian.dumitrescu@intel.com>,
	 "P, Venkata Suresh Kumar" <venkata.suresh.kumar.p@intel.com>,
	Yogesh Jangra <yogesh.jangra@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2] examples/pipeline: support CLI hex args
Date: Wed, 24 Mar 2021 13:31:17 +0100	[thread overview]
Message-ID: <CAJFAV8zFqGib2n-tk-26EtnOwEpx2p4xjBaRV3QUYsAUoNsFYQ@mail.gmail.com> (raw)
In-Reply-To: <1616588553-47065-1-git-send-email-churchill.khangar@intel.com>

On Wed, Mar 24, 2021 at 1:20 PM Churchill Khangar
<churchill.khangar@intel.com> wrote:
>
> This patch allows specification of integer arguments for the
> CLI commands in hexadecimal and octal as well as decimal.
>
> Signed-off-by: Churchill Khangar <churchill.khangar@intel.com>
> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
> ---
>  examples/pipeline/cli.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/examples/pipeline/cli.c b/examples/pipeline/cli.c
> index ae06658..ef49eb8 100644
> --- a/examples/pipeline/cli.c
> +++ b/examples/pipeline/cli.c
> @@ -55,7 +55,7 @@
>         if (!isdigit(*p))

Not directly related to this change, but the isdigit() check is
probably useless.
strtoul returns the first invalid char.

>                 return -EINVAL;
>
> -       val = strtoul(p, &next, 10);
> +       val = strtoul(p, &next, 0);


-- 
David Marchand


  reply	other threads:[~2021-03-24 12:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05 15:15 [dpdk-dev] [PATCH] examples/pipeline: fix strtoul base Churchill Khangar
2021-03-24  9:05 ` Thomas Monjalon
2021-03-24 10:41   ` Dumitrescu, Cristian
2021-03-24 12:22 ` [dpdk-dev] [PATCH v2] examples/pipeline: support CLI hex args Churchill Khangar
2021-03-24 12:31   ` David Marchand [this message]
2021-03-24 12:52     ` Dumitrescu, Cristian
2021-03-24 17:25   ` Thomas Monjalon

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=CAJFAV8zFqGib2n-tk-26EtnOwEpx2p4xjBaRV3QUYsAUoNsFYQ@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=churchill.khangar@intel.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=venkata.suresh.kumar.p@intel.com \
    --cc=yogesh.jangra@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).