[dpdk-dev] [v3 2/3] LPM config file read option.
Stephen Hemminger
stephen at networkplumber.org
Mon Mar 6 17:45:13 CET 2017
On Sat, 4 Mar 2017 12:44:18 -0800
Ravi Kerur <rkerur at 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.
More information about the dev
mailing list