From: Stephen Hemminger <stephen@networkplumber.org>
To: Wei Zhao <wei.zhao1@intel.com>
Cc: dev@dpdk.org, stable@dpdk.org, qi.z.zhang@intel.com,
adrien.mazarguil@6wind.com
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix support of hex string parser for flow API
Date: Mon, 18 Mar 2019 08:27:07 -0700 [thread overview]
Message-ID: <20190318082707.1dfb60d7@shemminger-XPS-13-9360> (raw)
In-Reply-To: <1552639435-68184-1-git-send-email-wei.zhao1@intel.com>
On Fri, 15 Mar 2019 16:43:55 +0800
Wei Zhao <wei.zhao1@intel.com> wrote:
> + /* Check input parameters */
> + if ((src == NULL) ||
> + (dst == NULL) ||
> + (size == NULL) ||
> + (*size == 0))
> + return -1;
> + if ((*size & 1) != 0)
> + return -1;
> +
> + for (c = src, i = 0; i < *size; c++, i++) {
> + if ((((*c) >= '0') && ((*c) <= '9')) ||
> + (((*c) >= 'A') && ((*c) <= 'F')) ||
> + (((*c) >= 'a') && ((*c) <= 'f')))
> + continue;
> +
Excessive number of parens here. You don't need them around (*c)
Why did you not use isxdigit() instead?
next prev parent reply other threads:[~2019-03-18 15:27 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-15 8:43 Wei Zhao
2019-03-15 8:43 ` Wei Zhao
2019-03-15 9:44 ` Ananyev, Konstantin
2019-03-15 9:44 ` Ananyev, Konstantin
2019-03-18 1:36 ` Zhao1, Wei
2019-03-18 1:36 ` Zhao1, Wei
2019-03-18 8:49 ` Zhao1, Wei
2019-03-18 8:49 ` Zhao1, Wei
2019-03-21 14:03 ` Ananyev, Konstantin
2019-03-21 14:03 ` Ananyev, Konstantin
2019-03-22 1:34 ` Zhao1, Wei
2019-03-22 1:34 ` Zhao1, Wei
2019-03-18 8:16 ` [dpdk-dev] [PATCH v2] " Wei Zhao
2019-03-18 8:16 ` Wei Zhao
2019-03-19 5:23 ` Zhao1, Wei
2019-03-19 5:23 ` Zhao1, Wei
2019-03-22 3:15 ` [dpdk-dev] [PATCH v3] " Wei Zhao
2019-03-22 3:15 ` Wei Zhao
2019-03-22 14:56 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2019-03-22 14:56 ` Ferruh Yigit
2019-03-25 3:39 ` Zhao1, Wei
2019-03-25 3:39 ` Zhao1, Wei
2019-03-25 8:45 ` Ferruh Yigit
2019-03-25 8:45 ` Ferruh Yigit
2019-03-25 9:25 ` Zhao1, Wei
2019-03-25 9:25 ` Zhao1, Wei
2019-03-25 9:35 ` Ferruh Yigit
2019-03-25 9:35 ` Ferruh Yigit
2019-03-25 9:39 ` Zhao1, Wei
2019-03-25 9:39 ` Zhao1, Wei
2019-04-09 7:38 ` Zhao1, Wei
2019-04-09 7:38 ` Zhao1, Wei
2019-04-09 8:44 ` Ferruh Yigit
2019-04-09 8:44 ` Ferruh Yigit
2019-04-09 9:12 ` Zhao1, Wei
2019-04-09 9:12 ` Zhao1, Wei
2019-04-09 7:40 ` Zhao1, Wei
2019-04-09 7:40 ` Zhao1, Wei
2019-04-09 7:42 ` Zhao1, Wei
2019-04-09 7:42 ` Zhao1, Wei
2019-04-09 8:41 ` [dpdk-dev] [PATCH v4] " Wei Zhao
2019-04-09 8:41 ` Wei Zhao
2019-04-11 18:40 ` Ferruh Yigit
2019-04-11 18:40 ` Ferruh Yigit
2019-03-18 15:27 ` Stephen Hemminger [this message]
2019-03-18 15:27 ` [dpdk-dev] [PATCH] " Stephen Hemminger
2019-03-22 1:34 ` Zhao1, Wei
2019-03-22 1:34 ` Zhao1, Wei
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=20190318082707.1dfb60d7@shemminger-XPS-13-9360 \
--to=stephen@networkplumber.org \
--cc=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.com \
--cc=stable@dpdk.org \
--cc=wei.zhao1@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).