On 09/27/2017 11:29 PM, Dmitry Selyutin wrote:
How about strscpy from the Linux kernel?
Yes, that's a better API than strlcpy. Though I would change its ssize_t 
to ptrdiff_t, so that it depends only on stddef.h. Plus, I would define 
its behavior even if the buffers overlap - that's safer, and the 
function is for when safety is more important than performance or 
correctness.

Reply via email to