Hi, Stephen Hemminger > -----Original Message----- > From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Monday, March 18, 2019 11:27 PM > To: Zhao1, Wei <wei.zh...@intel.com> > Cc: dev@dpdk.org; sta...@dpdk.org; Zhang, Qi Z <qi.z.zh...@intel.com>; > adrien.mazarg...@6wind.com > Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix support of hex string > parser for flow API > > On Fri, 15 Mar 2019 16:43:55 +0800 > Wei Zhao <wei.zh...@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?
Ok, I will have a try of isxdigit() and update in v2.