From: Maciej W. Rozycki Date: Thu, 29 May 2025 21:11:38 +0000 (+0100) Subject: manual: Document error codes missing for 'inet_ntop' X-Git-Tag: glibc-2.42~190 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=79b5febd762d6735ba8e878086a50ea04993e340;p=thirdparty%2Fglibc.git manual: Document error codes missing for 'inet_ntop' Add documentation for EAFNOSUPPORT and ENOSPC error codes returned, and the return value on failure. Reviewed-by: Florian Weimer --- diff --git a/manual/socket.texi b/manual/socket.texi index ed24cd5bd4..2f0e7509e9 100644 --- a/manual/socket.texi +++ b/manual/socket.texi @@ -1211,7 +1211,19 @@ network (binary) to presentation (textual) form. @var{af} should be 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 @node Host Names