Michael Stefaniuc : libs/wine: Use ARRAY_SIZE instead of open coding it.
Module: wine Branch: master Commit: 24a7497bab1a8c0ab3b0575f21e42726603e1b17 URL: https://gitlab.winehq.org/wine/wine/-/commit/24a7497bab1a8c0ab3b0575f21e4272... Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Tue Oct 18 19:04:49 2022 +0200 libs/wine: Use ARRAY_SIZE instead of open coding it. --- libs/wine/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/wine/config.c b/libs/wine/config.c index 23c76fda128..4eb446258cc 100644 --- a/libs/wine/config.c +++ b/libs/wine/config.c @@ -147,7 +147,7 @@ static char *get_runtime_exedir(void) static int pathname[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 }; size_t dir_size = PATH_MAX; 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; free( dir ); return NULL;
participants (1)
-
Alexandre Julliard