mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 23:23:38 +00:00
winegcc: Use ARRAY_SIZE instead of open coding it.
This commit is contained in:
parent
7029bba31a
commit
b46eef7e2a
|
@ -660,7 +660,7 @@ static void init_argv0_dir( const char *argv0 )
|
|||
static int pathname[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
|
||||
size_t path_size = PATH_MAX;
|
||||
char *path = xmalloc( path_size );
|
||||
if (!sysctl( pathname, sizeof(pathname)/sizeof(pathname[0]), path, &path_size, NULL, 0 ))
|
||||
if (!sysctl( pathname, ARRAY_SIZE(pathname), path, &path_size, NULL, 0 ))
|
||||
dir = realpath( path, NULL );
|
||||
free( path );
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue