Commit af996344 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

loader: Use ARRAY_SIZE instead of open coding it.

parent c2d800f1
...@@ -90,7 +90,7 @@ static const char *get_self_exe( char *argv0 ) ...@@ -90,7 +90,7 @@ static const char *get_self_exe( char *argv0 )
static int pathname[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 }; static int pathname[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
size_t path_size = PATH_MAX; size_t path_size = PATH_MAX;
char *path = malloc( path_size ); 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; return path;
free( path ); free( path );
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment