From 252795264df50a6c9eee604d29989854d5558139 Mon Sep 17 00:00:00 2001 From: walter harms Date: Thu, 5 May 2005 16:16:20 -0700 Subject: [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 --- lib/string.c | 4 ++++ 1 file changed, 4 insertions(+) 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) { -- cgit v1.2.3-59-g8ed1b