diff --git a/compat/mingw.c b/compat/mingw.c index b8a62bf9147092..a0eb695653ef35 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -1952,7 +1952,7 @@ struct passwd *getpwuid(int uid) if (initialized) return p; - len = sizeof(buf); + len = ARRAY_SIZE(buf); if (!GetUserNameW(buf, &len)) { initialized = 1; return NULL;