All of lore.kernel.org
 help / color / mirror / Atom feed
* wcschr(3): add special case for  NUL, as in strchr(3)
@ 2021-07-12  9:37 Stefan Kanthak
  2021-07-12 16:09 ` Jakub Wilk
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Kanthak @ 2021-07-12  9:37 UTC (permalink / raw)
  To: mtk.manpages, alx.manpages; +Cc: linux-man

Hi,

in the section return value, strchr(3) and strrchr(3) explicitly
state the behaviour for NUL:

<https://man7.org/linux/man-pages/man3/strstr.3.html#RETURN_VALUE>
<https://man7.org/linux/man-pages/man3/strrchr.3.html#RETURN_VALUE>

|  The terminating null byte is considered part of the string, so
|  that if c is specified as '\0', these functions return a pointer
|  to the terminator.

JFTR: to avoid any possible confusion of "null byte" alias NUL with
      the "null pointer" alias NULL (C macro) or nullptr (C++),
      "null byte" should be replaced with "NUL byte"!

The same explicit statement is but missing from both
<https://man7.org/linux/man-pages/man3/wcschr.3.html#RETURN_VALUE>
and
<https://man7.org/linux/man-pages/man3/wcsrchr.3.html#RETURN_VALUE>
and should be added there.

regards
Stefan

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-10  6:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-12  9:37 wcschr(3): add special case for NUL, as in strchr(3) Stefan Kanthak
2021-07-12 16:09 ` Jakub Wilk
2021-07-12 18:41   ` Stefan Kanthak
2021-08-10  6:40     ` Michael Kerrisk (man-pages)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.