this clarifys the documentation on the behavier of strncpy().
Signed-off-by: Domen Puncer <[email protected]>
---
kj-domen/lib/string.c | 4 ++++
1 files changed, 4 insertions(+)
diff -L lib/c.bak -puN /dev/null /dev/null
diff -puN lib/string.c~comment-lib_string lib/string.c
--- kj/lib/string.c~comment-lib_string 2005-04-05 12:57:42.000000000 +0200
+++ kj-domen/lib/string.c 2005-04-05 12:57:42.000000000 +0200
@@ -85,6 +85,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)
{
_
this clarifys the documentation on the behavier of strncpy().
From: walter harms <[email protected]>
Signed-off-by: Domen Puncer <[email protected]>
---
[Geez, again, next time i'll send them to myself first]
kj-domen/lib/string.c | 4 ++++
1 files changed, 4 insertions(+)
diff -puN lib/string.c~comment-lib_string lib/string.c
--- kj/lib/string.c~comment-lib_string 2005-04-05 12:57:42.000000000 +0200
+++ kj-domen/lib/string.c 2005-04-05 12:57:42.000000000 +0200
@@ -85,6 +85,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)
{
_