[PATCH 4/5] manual: Document error codes missing for 'inet_ntop'

Florian Weimer fweimer@redhat.com
Mon May 26 13:28:39 GMT 2025


* Maciej W. Rozycki:

> From: Maciej W. Rozycki <macro@redhat.com>
>
> Add documentation for EAFNOSUPPORT and ENOSPC error codes returned, and 
> the return value on failure.
> ---
>  manual/socket.texi |   14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
>
> glibc-doc-inet_ntop-err.diff
>
> Index: glibc/manual/socket.texi
> ===================================================================
> --- glibc.orig/manual/socket.texi
> +++ glibc/manual/socket.texi
> @@ -1241,7 +1241,19 @@ network (binary) to presentation (textua
>  either @code{AF_INET} or @code{AF_INET6}, as appropriate.  @var{cp} is a
>  pointer to the address to be converted.  @var{buf} should be a pointer
>  to a buffer to hold the result, and @var{len} is the length of this
> -buffer.  The return value from the function will be this buffer address.
> +buffer.
> +
> +The return value is @var{buf} on success.  On failure, the function's
> +return value is a null pointer and @code{errno} is set accordingly.
> +The following @code{errno} values are specific to this function:
> +
> +@table @code
> +@item EAFNOSUPPORT
> +The address family requested is neither @code{AF_INET} nor @code{AF_INET6}.
> +
> +@item ENOSPC
> +Insufficient space available for the result in the buffer provided.
> +@end table
>  @end deftypefun

Looks good.

Reviewed-by: Florian Weimer <fweimer@redhat.com>

Thanks,
Florian



More information about the Libc-alpha mailing list