]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
manual: Document error codes missing for 'inet_ntop'
authorMaciej W. Rozycki <macro@redhat.com>
Thu, 29 May 2025 21:11:38 +0000 (22:11 +0100)
committerMaciej W. Rozycki <macro@redhat.com>
Thu, 29 May 2025 21:11:38 +0000 (22:11 +0100)
Add documentation for EAFNOSUPPORT and ENOSPC error codes returned, and
the return value on failure.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
manual/socket.texi

index ed24cd5bd41ce8c072e813435b7ff3aea3e8b6b9..2f0e7509e92974d1a8b72aff064202c13ea841a3 100644 (file)
@@ -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