From: Ben Pfaff Date: Sat, 18 Sep 2004 06:34:27 +0000 (+0000) Subject: Clarify strtok_r() description. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=697b1e606a87d72840da039438f0d3325da5784d;p=pintos-anon Clarify strtok_r() description. --- diff --git a/src/lib/string.c b/src/lib/string.c index bec4444..cb042f0 100644 --- 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 - 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: