Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

lib/string.c: use the name "C-string" in comments

For strncpy() and friends the source string may or may not have an actual
NUL character at the end. The documentation is confusing in this because
it specifically mentions that you are passing a "NUL-terminated" string.
Wikipedia says that "C-string" is an alternative name we can use instead.

http://en.wikipedia.org/wiki/Null-terminated_string

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Dan Carpenter and committed by
Linus Torvalds
0046dd9f a8fe19eb

+4 -4
+4 -4
lib/string.c
··· 107 107 108 108 #ifndef __HAVE_ARCH_STRNCPY 109 109 /** 110 - * strncpy - Copy a length-limited, %NUL-terminated string 110 + * strncpy - Copy a length-limited, C-string 111 111 * @dest: Where to copy the string to 112 112 * @src: Where to copy the string from 113 113 * @count: The maximum number of bytes to copy ··· 136 136 137 137 #ifndef __HAVE_ARCH_STRLCPY 138 138 /** 139 - * strlcpy - Copy a %NUL terminated string into a sized buffer 139 + * strlcpy - Copy a C-string into a sized buffer 140 140 * @dest: Where to copy the string to 141 141 * @src: Where to copy the string from 142 142 * @size: size of destination buffer ··· 182 182 183 183 #ifndef __HAVE_ARCH_STRNCAT 184 184 /** 185 - * strncat - Append a length-limited, %NUL-terminated string to another 185 + * strncat - Append a length-limited, C-string to another 186 186 * @dest: The string to be appended to 187 187 * @src: The string to append to it 188 188 * @count: The maximum numbers of bytes to copy ··· 211 211 212 212 #ifndef __HAVE_ARCH_STRLCAT 213 213 /** 214 - * strlcat - Append a length-limited, %NUL-terminated string to another 214 + * strlcat - Append a length-limited, C-string to another 215 215 * @dest: The string to be appended to 216 216 * @src: The string to append to it 217 217 * @count: The size of the destination buffer.