mirror of
https://gitlab.winehq.org/wine/wine.git
synced 2024-11-21 17:09:06 -07:00
loader: Use ARRAY_SIZE instead of open coding it.
This commit is contained in:
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
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue