[PATCH v1 1/2] net/ice: support dump ice ddp package

Stephen Hemminger stephen at networkplumber.org
Wed May 18 17:21:29 CEST 2022


On Wed, 11 May 2022 08:02:46 +0000
Steve Yang <stevex.yang at intel.com> wrote:

> +#define ICE_PKG_COPY_STRING(dst, src)	\
> +	do {\
> +		char *_dst = (dst); \
> +		const char *_src = (src); \
> +		memset(_dst, SPACE_CHAR, ICE_PKG_NAME_SIZE); \
> +		strncpy(_dst, _src, strlen(_src) + 1); \
> +	} while (0)

Reinventing strlcpy why?


More information about the dev mailing list