Re: [PATCH] circleq.3: Fix CIRCLEQ_LOOP_*() return type

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

 



Hi Alex,

On 1/19/21 10:12 PM, Alejandro Colomar wrote:
> Signed-off-by: Alejandro Colomar <alx.manpages@xxxxxxxxx>
> ---
>  man3/circleq.3 | 18 ++++++++++++++----
>  1 file changed, 14 insertions(+), 4 deletions(-)

Thanks. Patch applied.

Cheers,

Michael

> diff --git a/man3/circleq.3 b/man3/circleq.3
> index 6b6b9aa14..f21bbf903 100644
> --- a/man3/circleq.3
> +++ b/man3/circleq.3
> @@ -75,9 +75,9 @@ CIRCLEQ_REMOVE
>  .BI "struct TYPE *CIRCLEQ_LAST(CIRCLEQ_HEAD *" head );
>  .BI "struct TYPE *CIRCLEQ_PREV(struct TYPE *" elm ", CIRCLEQ_ENTRY " NAME );
>  .BI "struct TYPE *CIRCLEQ_NEXT(struct TYPE *" elm ", CIRCLEQ_ENTRY " NAME );
> -.BI "void CIRCLEQ_LOOP_PREV(CIRCLEQ_HEAD *" head ,
> +.BI "struct TYPE *CIRCLEQ_LOOP_PREV(CIRCLEQ_HEAD *" head ,
>  .BI "                           struct TYPE *" elm ", CIRCLEQ_ENTRY " NAME );
> -.BI "void CIRCLEQ_LOOP_NEXT(CIRCLEQ_HEAD *" head ,
> +.BI "struct TYPE *CIRCLEQ_LOOP_NEXT(CIRCLEQ_HEAD *" head ,
>  .BI "                           struct TYPE *" elm ", CIRCLEQ_ENTRY " NAME );
>  .PP
>  .BI "CIRCLEQ_FOREACH(struct TYPE *" var ", CIRCLEQ_HEAD *" head ,
> @@ -238,13 +238,23 @@ and zero if the queue contains at least one entry.
>  .PP
>  .BR CIRCLEQ_FIRST (),
>  .BR CIRCLEQ_LAST (),
> -.BR CIRCLEQ_PREV (),
> +.BR CIRCLEQ_LOOP_PREV (),
>  and
> -.BR CIRCLEQ_NEXT ()
> +.BR CIRCLEQ_LOOP_NEXT ()
>  return a pointer to the first, last, previous, or next
>  .I TYPE
>  structure, respectively.
>  .PP
> +.BR CIRCLEQ_PREV (),
> +and
> +.BR CIRCLEQ_NEXT ()
> +are similar to their
> +.BR CIRCLEQ_LOOP_* ()
> +counterparts,
> +except that if the argument is the first or last element, respectively,
> +they return
> +.IR &head .
> +.PP
>  .BR CIRCLEQ_HEAD_INITIALIZER ()
>  returns an initializer that can be assigned to the queue
>  .IR head .
> 


-- 
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