Hello, On 9/20/19 10:43 AM, eponymous alias wrote: > The 2019-03-06 strtok_r(3) man page says: > > On the first call to strtok_r(), str should point to the string to be > parsed, and the value of saveptr is ignored. > > Uh, no. That would make saveptr totally useless. A quick fix would > be: > > On the first call to strtok_r(), str should point to the string to be > parsed, and the value of *saveptr is ignored. Thanks. I applied the patch below. Michael diff --git a/man3/strtok.3 b/man3/strtok.3 index 32552534e..9efb18a8d 100644 --- a/man3/strtok.3 +++ b/man3/strtok.3 @@ -146,12 +146,12 @@ On the first call to .BR strtok_r (), .I str should point to the string to be parsed, and the value of -.I saveptr +.I *saveptr is ignored. In subsequent calls, .I str should be NULL, and -.I saveptr +.I *saveptr should be unchanged since the previous call. .PP Different strings may be parsed concurrently using sequences of calls to -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/