diff options
Diffstat (limited to 'os-posix.c')
-rw-r--r-- | os-posix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/os-posix.c b/os-posix.c index 00133a0c76..6321e990c5 100644 --- a/os-posix.c +++ b/os-posix.c @@ -110,7 +110,7 @@ char *os_find_datadir(const char *argv0) size_t len = sizeof(buf) - 1; *buf = '\0'; - if (!sysctl(mib, sizeof(mib)/sizeof(*mib), buf, &len, NULL, 0) && + if (!sysctl(mib, ARRAY_SIZE(mib), buf, &len, NULL, 0) && *buf) { buf[sizeof(buf) - 1] = '\0'; p = buf; |