From: Stephen Hemminger <stephen@networkplumber.org>
To: Ravi Kerur <rkerur@gmail.com>
Cc: dev@dpdk.org, konstantin.ananyev@intel.com, bruce.richardson@intel.com
Subject: Re: [dpdk-dev] [v3 2/3] LPM config file read option.
Date: Mon, 6 Mar 2017 08:45:13 -0800 [thread overview]
Message-ID: <20170306084513.5d3cf820@xeon-e3> (raw)
In-Reply-To: <1488660259-6228-3-git-send-email-rkerur@gmail.com>
On Sat, 4 Mar 2017 12:44:18 -0800
Ravi Kerur <rkerur@gmail.com> wrote:
> +#define GET_CB_FIELD(in, fd, base, lim, dlm) do { \
> + unsigned long val; \
> + char *end; \
> + errno = 0; \
> + val = strtoul((in), &end, (base)); \
> + if (errno != 0 || end[0] != (dlm) || val > (lim)) \
> + return -EINVAL; \
> + (fd) = (typeof(fd))val; \
> + (in) = end + 1; \
> +} while (0)
> +
Marcos are source of bugs, please write as function.
next prev parent reply other threads:[~2017-03-06 16:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-04 20:44 [dpdk-dev] [v3 0/3] Merge l3fwd-acl and l3fwd Ravi Kerur
2017-03-04 20:44 ` [dpdk-dev] [v3 1/3] Merge l3fwd-acl and l3fwd code Ravi Kerur
2017-03-04 20:44 ` [dpdk-dev] [v3 2/3] LPM config file read option Ravi Kerur
2017-03-06 16:45 ` Stephen Hemminger [this message]
2017-03-06 16:46 ` Stephen Hemminger
2017-03-06 23:16 ` Ravi Kerur
2017-03-04 20:44 ` [dpdk-dev] [v3 3/3] EM " Ravi Kerur
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=20170306084513.5d3cf820@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=konstantin.ananyev@intel.com \
--cc=rkerur@gmail.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).