From c9b399365fa6da2341b28912b29e2053f6fe62db Mon Sep 17 00:00:00 2001 From: Antoine Jacoutot Date: Mon, 9 Jul 2012 18:17:01 +0200 Subject: [PATCH] goptions: use G_N_ELEMENTS instead of nitems --- glib/goption.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/glib/goption.c b/glib/goption.c index 2fb42e137..9f54be017 100644 --- a/glib/goption.c +++ b/glib/goption.c @@ -1680,11 +1680,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;