From: walter harms Date: Thu, 5 May 2005 23:16:20 +0000 (-0700) Subject: [PATCH] documentation for strncpy() X-Git-Tag: v2.6.12-rc4~32 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=252795264df50a6c9eee604d29989854d5558139;p=linux-2.6 [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 5c8b55af0d..d886ef157c 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) {