[glib/glib-2-32] goptions: use G_N_ELEMENTS instead of nitems
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-32] goptions: use G_N_ELEMENTS instead of nitems
- Date: Sat, 14 Jul 2012 23:23:40 +0000 (UTC)
commit c9b399365fa6da2341b28912b29e2053f6fe62db
Author: Antoine Jacoutot <ajacoutot gnome org>
Date: Mon Jul 9 18:17:01 2012 +0200
goptions: use G_N_ELEMENTS instead of nitems
glib/goption.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/glib/goption.c b/glib/goption.c
index 2fb42e1..9f54be0 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]