mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 09:33:38 +00:00
libs/wine: Use ARRAY_SIZE instead of open coding it.
This commit is contained in:
parent
af996344a8
commit
24a7497bab
|
@ -147,7 +147,7 @@ static char *get_runtime_exedir(void)
|
||||||
static int pathname[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
|
static int pathname[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
|
||||||
size_t dir_size = PATH_MAX;
|
size_t dir_size = PATH_MAX;
|
||||||
char *dir = malloc( dir_size );
|
char *dir = malloc( dir_size );
|
||||||
if (dir && !sysctl( pathname, sizeof(pathname)/sizeof(pathname[0]), dir, &dir_size, NULL, 0 ))
|
if (dir && !sysctl( pathname, ARRAY_SIZE( pathname ), dir, &dir_size, NULL, 0 ))
|
||||||
return dir;
|
return dir;
|
||||||
free( dir );
|
free( dir );
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in a new issue