Commit 252795264df50a6c9eee604d29989854d5558139
Committed by
Linus Torvalds
1 parent
ebe8b54134
Exists in
master
and in
7 other branches
[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>
Showing 1 changed file with 4 additions and 0 deletions Side-by-side Diff
lib/string.c
... | ... | @@ -86,6 +86,10 @@ |
86 | 86 | * |
87 | 87 | * The result is not %NUL-terminated if the source exceeds |
88 | 88 | * @count bytes. |
89 | + * | |
90 | + * In the case where the length of @src is less than that of | |
91 | + * count, the remainder of @dest will be padded with %NUL. | |
92 | + * | |
89 | 93 | */ |
90 | 94 | char * strncpy(char * dest,const char *src,size_t count) |
91 | 95 | { |