[PATCH] documentation for strncpy()
authorwalter harms <wharms@bfs.de>
Thu, 5 May 2005 23:16:20 +0000 (16:16 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 5 May 2005 23:36:50 +0000 (16:36 -0700)
this clarifies the documentation on the behavier of strncpy().

Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
lib/string.c

index 5c8b55af0df6ec24a9af24c3a4707a52fb8f2573..d886ef157c121ffb04fec4db267ee9af69e01f60 100644 (file)
@@ -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)
 {