Re: [dpdk-dev] [PATCH 1/2] add support for strlcpy function

2018-03-12 Thread Bruce Richardson
On Mon, Mar 12, 2018 at 11:32:59AM +, Bruce Richardson wrote: > The strncpy function is error prone for doing "safe" string copies, so > we generally try to use "snprintf" instead in the code. The function > "strlcpy" is a better alternative, since it better conveys the > intention of the progr

[dpdk-dev] [PATCH 1/2] add support for strlcpy function

2018-03-12 Thread Bruce Richardson
The strncpy function is error prone for doing "safe" string copies, so we generally try to use "snprintf" instead in the code. The function "strlcpy" is a better alternative, since it better conveys the intention of the programmer, and doesn't suffer from the non-null terminating behaviour of it's