From 4749878f9102d40d072bb5c838f2dd2e8d61d417 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 d34901e..4ebc560 100644 --- a/glib/goption.c +++ b/glib/goption.c @@ -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; -- 2.7.4