From 282f928dc777faf3cee67a648bb770bbd54276d0 Mon Sep 17 00:00:00 2001 From: pfg Date: Sat, 16 Apr 2016 17:52:00 +0000 Subject: libc: make some more use of the nitems() macro. We have an nitems() macro in the 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. --- lib/libc/resolv/herror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libc/resolv/herror.c') 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; -- cgit v1.1