[PATCH v12 2/3] cmdline: add floating point support

Stephen Hemminger stephen at networkplumber.org
Thu Feb 26 19:19:35 CET 2026


On Thu, 26 Feb 2026 16:44:49 +0000
Anatoly Burakov <anatoly.burakov at intel.com> wrote:

> +	if (type == RTE_FLOAT_SINGLE)
> +		dres = (double)strtof(srcbuf, &end);
> +	else if (type == RTE_FLOAT_DOUBLE)
> +		dres = strtod(srcbuf, &end);
> +	else
> +		return -1;
> +

You could use strtod for both.
The conversion from double to float could happen in caller.


More information about the dev mailing list