ISO C Standard 9899:1990
Section 7.11.2.4
Synopsis
#include <string.h>
char *strncpy(char *s1, const char *s2, size_t n);
[snip]
"If the array pointed to by s2 is a string that is shorter than n
characters, null characters are appended to the copy in the array
pointed to by s1, until n characters in all have been written."
> You mean in the kernel source. not the libc. Perhaps they should have
> called it kstrncpy 'cause it's not visible to user-space and ansi doesn't
> apply there anyway.
I guess it doesn't really matter then, unless someone writing kernel
code expects it to behave this way, which is doubtful.
Brad Proctor
-- "Doc, you gotta help us, we've tried nothing and we're all out of ideas!" -- Ned Flanders motherEmail: <fredie@sprynet.com> Home Page: "http://members.xoom.com/fredlie/"
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/