Re: [PATCH] lib: string.c: Added a funktion function strzcpy

From: Andi Kleen
Date: Tue Sep 23 2014 - 21:29:53 EST


On Wed, Sep 24, 2014 at 12:13:36AM +0200, Rickard Strandqvist wrote:
> Added a function strzcpy which works the same as strncpy,
> but guaranteed to produce the trailing null character.

Do we really need the bizarre strncpy padding semantics for anything?
Why not just use strlcpy?

-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/