From: Ben Pfaff Date: Thu, 8 Mar 2007 11:17:17 +0000 (+0000) Subject: Note that the GNU/Linux manpage for strtok claims that it uses a X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e02ac9d874accb48b6f0b52cc8025e9e305caf24;p=pintos-anon Note that the GNU/Linux manpage for strtok claims that it uses a static buffer, which is wrong. --- diff --git a/ta-advice/HW2 b/ta-advice/HW2 index 7a79395..95049b3 100644 --- a/ta-advice/HW2 +++ b/ta-advice/HW2 @@ -102,6 +102,16 @@ A3: parsing. This is wrong: it modifies the string provided and stores a pointer into it statically. + However, the manpage for on GNU/Linux (at least) says that + strtok uses a static buffer. That's wrong. So don't + penalize students who repeat that claim. Instead, please + add a note, such as: + + Although some manpages for strtok do claim that strtok + uses a static buffer, this is incorrect. strtok uses a + user-provided buffer and statically stores a pointer + into that buffer. + A4: Some correct answers: