loader: Use ARRAY_SIZE instead of open coding it.

This commit is contained in:
Michael Stefaniuc 2022-10-18 19:02:59 +02:00 committed by Alexandre Julliard
parent c2d800f1db
commit af996344a8
Notes: Alexandre Julliard 2022-10-25 22:48:49 +02:00
Approved-by: Huw Davies (@huw)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/wine/-/merge_requests/1155

View file

@ -90,7 +90,7 @@ static const char *get_self_exe( char *argv0 )
static int pathname[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
size_t path_size = PATH_MAX;
char *path = malloc( path_size );
if (path && !sysctl( pathname, sizeof(pathname)/sizeof(pathname[0]), path, &path_size, NULL, 0 ))
if (path && !sysctl( pathname, ARRAY_SIZE( pathname ), path, &path_size, NULL, 0 ))
return path;
free( path );
#endif