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



> -----Original Message-----
> From: David Marchand <david.marchand@redhat.com>
> Sent: Wednesday, March 24, 2021 12:31 PM
> To: Khangar, Churchill <churchill.khangar@intel.com>
> Cc: dev <dev@dpdk.org>; Dumitrescu, Cristian
> <cristian.dumitrescu@intel.com>; P, Venkata Suresh Kumar
> <venkata.suresh.kumar.p@intel.com>; Jangra, Yogesh
> <yogesh.jangra@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v2] examples/pipeline: support CLI hex args
> 
> 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.
> 

Yes, correct, more improvements could be made, we'll put it on the to-do list. Thanks, David.

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


  reply	other threads:[~2021-03-24 12:52 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
2021-03-24 12:52     ` Dumitrescu, Cristian [this message]
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=BN7PR11MB27865AB9D46C55F703693D86EB639@BN7PR11MB2786.namprd11.prod.outlook.com \
    --to=cristian.dumitrescu@intel.com \
    --cc=churchill.khangar@intel.com \
    --cc=david.marchand@redhat.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).