aboutsummaryrefslogtreecommitdiffstats
path: root/lib/string.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-06-04 19:11:47 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-04 19:54:18 -0400
commit0046dd9fed0c9313cbb4fb860324476cd298dc9f (patch)
treeae450418fa5963507fb3aee838c0e0077313f53b /lib/string.c
parenta8fe19ebfbfd90ec17c02284717238b02efb9580 (diff)
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>
Diffstat (limited to 'lib/string.c')
-rw-r--r--lib/string.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/string.c b/lib/string.c
index e0c20eb362f0..992bf30af759 100644
--- a/lib/string.c
+++ b/lib/string.c
@@ -107,7 +107,7 @@ EXPORT_SYMBOL(strcpy);
107 107
108#ifndef __HAVE_ARCH_STRNCPY 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 * @dest: Where to copy the string to 111 * @dest: Where to copy the string to
112 * @src: Where to copy the string from 112 * @src: Where to copy the string from
113 * @count: The maximum number of bytes to copy 113 * @count: The maximum number of bytes to copy
@@ -136,7 +136,7 @@ EXPORT_SYMBOL(strncpy);
136 136
137#ifndef __HAVE_ARCH_STRLCPY 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 * @dest: Where to copy the string to 140 * @dest: Where to copy the string to
141 * @src: Where to copy the string from 141 * @src: Where to copy the string from
142 * @size: size of destination buffer 142 * @size: size of destination buffer
@@ -182,7 +182,7 @@ EXPORT_SYMBOL(strcat);
182 182
183#ifndef __HAVE_ARCH_STRNCAT 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 * @dest: The string to be appended to 186 * @dest: The string to be appended to
187 * @src: The string to append to it 187 * @src: The string to append to it
188 * @count: The maximum numbers of bytes to copy 188 * @count: The maximum numbers of bytes to copy
@@ -211,7 +211,7 @@ EXPORT_SYMBOL(strncat);
211 211
212#ifndef __HAVE_ARCH_STRLCAT 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 * @dest: The string to be appended to 215 * @dest: The string to be appended to
216 * @src: The string to append to it 216 * @src: The string to append to it
217 * @count: The size of the destination buffer. 217 * @count: The size of the destination buffer.