[dpdk-dev] [PATCH v6 02/25] ethdev: add a link status text representation

Stephen Hemminger stephen at networkplumber.org
Mon Jul 6 23:30:26 CEST 2020


On Mon,  6 Jul 2020 23:37:16 +0300
Ivan Dyukov <i.dyukov at samsung.com> wrote:

> +			/* Error cases */
> +			default:
> +				return -1;
> +

Since very little of the code is checking for errors, why return on
bad format. Why not do what printf() does and ignore what is not specified.

Example:

	r = printf("Wierd %W format\n", x);
	printf("returned %d\n", r);

Wierd %W format
returned 16


More information about the dev mailing list