From: walter harms Date: Thu, 5 May 2005 23:16:20 +0000 (-0700) Subject: [PATCH] documentation for strncpy() X-Git-Tag: firefly_0821_release~43292 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=252795264df50a6c9eee604d29989854d5558139;p=firefly-linux-kernel-4.4.55.git [PATCH] documentation for strncpy() this clarifies the documentation on the behavier of strncpy(). Signed-off-by: Domen Puncer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/lib/string.c b/lib/string.c index 5c8b55af0df6..d886ef157c12 100644 --- a/lib/string.c +++ b/lib/string.c @@ -86,6 +86,10 @@ EXPORT_SYMBOL(strcpy); * * The result is not %NUL-terminated if the source exceeds * @count bytes. + * + * In the case where the length of @src is less than that of + * count, the remainder of @dest will be padded with %NUL. + * */ char * strncpy(char * dest,const char *src,size_t count) {