summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/getpwent.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen/getpwent.c')
-rw-r--r--lib/libc/gen/getpwent.c2
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);
OpenPOWER on IntegriCloud