diff options
author | pfg <pfg@FreeBSD.org> | 2016-04-16 17:52:00 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-04-16 17:52:00 +0000 |
commit | 282f928dc777faf3cee67a648bb770bbd54276d0 (patch) | |
tree | 9591d290a7b32152d9fdda623974bad433ef861f /lib/libc/gen/getpwent.c | |
parent | d758bd7be40b8aeb4b09c640dd54153bfe5592ca (diff) | |
download | FreeBSD-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/gen/getpwent.c')
-rw-r--r-- | lib/libc/gen/getpwent.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index 8617ecc..a35a288 100644 --- a/lib/libc/gen/getpwent.c +++ b/lib/libc/gen/getpwent.c @@ -748,7 +748,7 @@ pwdbopen(int *version) else *version = 3; if (*version < 3 || - *version >= sizeof(pwdb_versions)/sizeof(pwdb_versions[0])) { + *version >= nitems(pwdb_versions)) { syslog(LOG_CRIT, "Unsupported password database version %d", *version); res->close(res); |