Module: wine Branch: master Commit: af996344a815baa1278d32181ddfda5e889a16d9 URL: https://gitlab.winehq.org/wine/wine/-/commit/af996344a815baa1278d32181ddfda5...
Author: Michael Stefaniuc mstefani@winehq.org Date: Tue Oct 18 19:02:59 2022 +0200
loader: Use ARRAY_SIZE instead of open coding it.
---
loader/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/loader/main.c b/loader/main.c index 242ff15accd..36e1f5f0967 100644 --- a/loader/main.c +++ b/loader/main.c @@ -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