goptions: use G_N_ELEMENTS instead of nitems

This commit is contained in:
Antoine Jacoutot 2012-07-09 18:17:01 +02:00
parent 5a85fe0e37
commit 4749878f91

View File

@ -1681,11 +1681,7 @@ platform_get_argv0 (void)
cmdline = (char **) realloc (cmdline, len);
#ifndef nitems
#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
#endif
if (sysctl (mib, nitems (mib), cmdline, &len, NULL, 0) == -1)
if (sysctl (mib, G_N_ELEMENTS (mib), cmdline, &len, NULL, 0) == -1)
{
g_free (cmdline);
return NULL;