Module: wine Branch: master Commit: b46eef7e2a12da77854700fb4e494b170fe10dae URL: https://gitlab.winehq.org/wine/wine/-/commit/b46eef7e2a12da77854700fb4e494b1...
Author: Michael Stefaniuc mstefani@winehq.org Date: Fri Jul 1 20:03:05 2022 +0200
winegcc: Use ARRAY_SIZE instead of open coding it.
---
tools/winegcc/winegcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index ab26adb07e8..e40aa9270ec 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -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