aboutsummaryrefslogtreecommitdiffstats
path: root/man/man3/getaddrinfo_a.3
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2024-11-17 18:47:53 +0100
committerAlejandro Colomar <alx@kernel.org>2024-11-17 21:51:23 +0100
commit18e7c4597c4e72fa5210c7887273e363c456c9ee (patch)
tree97cfd22e731a4c859ae71783d70943ff72e6cb60 /man/man3/getaddrinfo_a.3
parent8fc6fdd8291d906e58a175b5e1b20da680aaeb4a (diff)
downloadman-pages-18e7c4597c4e.tar.gz
man/: Terminology consistency reforms (n, size, length)
Use 'length' for the lenght of a string. Use 'n' for the number of elements. Use 'size' for the number of bytes. (And in wide-character string functions, 'size' also refers to the number of wide characters.) The change is quite large, and I might have made some mistakes. But overall, this should improve consistency in use of these terms. Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'man/man3/getaddrinfo_a.3')
-rw-r--r--man/man3/getaddrinfo_a.314
1 files changed, 7 insertions, 7 deletions
diff --git a/man/man3/getaddrinfo_a.3 b/man/man3/getaddrinfo_a.3
index cd955e4973..3441747192 100644
--- a/man/man3/getaddrinfo_a.3
+++ b/man/man3/getaddrinfo_a.3
@@ -21,8 +21,8 @@ Asynchronous name lookup library
.B #include <netdb.h>
.P
.BI "int getaddrinfo_a(int " mode ", struct gaicb *" list [restrict],
-.BI " int " nitems ", struct sigevent *restrict " sevp );
-.BI "int gai_suspend(const struct gaicb *const " list "[], int " nitems ,
+.BI " int " n ", struct sigevent *restrict " sevp );
+.BI "int gai_suspend(const struct gaicb *const " list "[], int " n ,
.BI " const struct timespec *" timeout );
.P
.BI "int gai_error(struct gaicb *" req );
@@ -56,7 +56,7 @@ The array
.I list
specifies the look-up requests to process.
The
-.I nitems
+.I n
argument specifies the number of elements in
.IR list .
The requested look-up operations are started in parallel.
@@ -165,7 +165,7 @@ function suspends execution of the calling thread,
waiting for the completion of one or more requests in the array
.IR list .
The
-.I nitems
+.I n
argument specifies the size of the array
.IR list .
The call blocks until one of the following occurs:
@@ -447,12 +447,12 @@ static struct gaicb **reqs = NULL;
static size_t nreqs = 0;
\&
static inline void *
-reallocarrayf(void *p, size_t nmemb, size_t size)
+reallocarrayf(void *p, size_t n, size_t size)
{
void *q;
\&
- q = reallocarray(p, nmemb, size);
- if (q == NULL && nmemb != 0 && size != 0)
+ q = reallocarray(p, n, size);
+ if (q == NULL && n != 0 && size != 0)
free(p);
return q;
}