Re: [PATCH] wcstok.3: Fix type mismatch in the example

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Jakub,

On 7/12/21 6:40 PM, Jakub Wilk wrote:
> Signed-off-by: Jakub Wilk <jwilk@xxxxxxxxx>

Thanks. Patch applied.

Cheers,

Michael

> ---
>  man3/wcstok.3 | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/man3/wcstok.3 b/man3/wcstok.3
> index 401411d98..af642ca46 100644
> --- a/man3/wcstok.3
> +++ b/man3/wcstok.3
> @@ -108,9 +108,9 @@ The following code loops over the tokens contained in a wide-character string.
>  wchar_t *wcs = ...;
>  wchar_t *token;
>  wchar_t *state;
> -for (token = wcstok(wcs, " \et\en", &state);
> +for (token = wcstok(wcs, L" \et\en", &state);
>      token != NULL;
> -    token = wcstok(NULL, " \et\en", &state)) {
> +    token = wcstok(NULL, L" \et\en", &state)) {
>      ...
>  }
>  .EE
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux