summaryrefslogtreecommitdiffstats
path: root/lib/libc/resolv/herror.c
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-04-16 17:52:00 +0000
committerpfg <pfg@FreeBSD.org>2016-04-16 17:52:00 +0000
commit282f928dc777faf3cee67a648bb770bbd54276d0 (patch)
tree9591d290a7b32152d9fdda623974bad433ef861f /lib/libc/resolv/herror.c
parentd758bd7be40b8aeb4b09c640dd54153bfe5592ca (diff)
downloadFreeBSD-src-282f928dc777faf3cee67a648bb770bbd54276d0.zip
FreeBSD-src-282f928dc777faf3cee67a648bb770bbd54276d0.tar.gz
libc: make some more use of the nitems() macro.
We have an nitems() macro in the <sys/param.h> header that is convenient to re-use as it makes things easier to read. Given that it is available already without adding additional headers and other parts of libc already use it, extend a bit more its use.
Diffstat (limited to 'lib/libc/resolv/herror.c')
-rw-r--r--lib/libc/resolv/herror.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/resolv/herror.c b/lib/libc/resolv/herror.c
index d987609..aeb308c 100644
--- a/lib/libc/resolv/herror.c
+++ b/lib/libc/resolv/herror.c
@@ -76,7 +76,7 @@ const char *h_errlist[] = {
"Unknown server error", /*%< 3 NO_RECOVERY */
"No address associated with name", /*%< 4 NO_ADDRESS */
};
-const int h_nerr = { sizeof h_errlist / sizeof h_errlist[0] };
+const int h_nerr = { nitems(h_errlist) };
#undef h_errno
int h_errno;
OpenPOWER on IntegriCloud