Re: [PATCH] memchr.3: memchr/memrchr take pointer arguments

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

 



Hi Nick,

On Sun, Jun 09, 2024 at 05:10:19AM GMT, nick black wrote:
> memchr: memchr/memrchr first argument is a pointer
> 
> Signed-off-by: nick black <dankamongmen@xxxxxxxxx>
> ---
>  man/man3/memchr.3 | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/man/man3/memchr.3 b/man/man3/memchr.3
> index bb598c7d4..24fbef340 100644
> --- a/man/man3/memchr.3
> +++ b/man/man3/memchr.3
> @@ -20,8 +20,8 @@ .SH SYNOPSIS
>  .nf
>  .B #include <string.h>
>  .P
> -.BI "void *memchr(const void " s [. n "], int " c ", size_t " n );
> -.BI "void *memrchr(const void " s [. n "], int " c ", size_t " n );
> +.BI "void *memchr(const void *" s [. n "], int " c ", size_t " n );
> +.BI "void *memrchr(const void *" s [. n "], int " c ", size_t " n );

But it's not an array of pointers.  :)

We use array syntax, even if being a bit illegal, to document to which
argument the size applies.  In these functions it's more obvious, but
in functions with several arguments, that's more important/useful.

Have a lovely day!
Alex

>  .P
>  .BI "[[deprecated]] void *rawmemchr(const void *" s ", int " c );
>  .fi
> 
> -- 
> nick black -=- https://www.nick-black.com
> to make an apple pie from scratch,
> you need first invent a universe.



-- 
<https://www.alejandro-colomar.es/>

Attachment: signature.asc
Description: PGP signature


[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