瀏覽代碼

[PATCH] documentation for strncpy()

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>
walter harms 20 年之前
父節點
當前提交
252795264d
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      lib/string.c

+ 4 - 0
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)
 {