projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clarify strtok_r() description.
[pintos-anon]
/
src
/
lib
/
string.c
diff --git
a/src/lib/string.c
b/src/lib/string.c
index bec4444670b025768485cb143edb0329de3cb60c..cb042f02242d02a2090f6566016fb45f67c0df21 100644
(file)
--- a/
src/lib/string.c
+++ b/
src/lib/string.c
@@
-212,7
+212,9
@@
strstr (const char *haystack, const char *needle)
single string.
strtok_r() modifies the string S, changing delimiters to null
single string.
strtok_r() modifies the string S, changing delimiters to null
- bytes. Thus, S must be a modifiable string.
+ bytes. Thus, S must be a modifiable string. String literals,
+ in particular, are *not* modifiable in C, even though for
+ backward compatibility they are not `const'.
Example usage:
Example usage: