projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a85fe0
)
goptions: use G_N_ELEMENTS instead of nitems
author
Antoine Jacoutot
<ajacoutot@gnome.org>
Mon, 9 Jul 2012 16:17:01 +0000
(18:17 +0200)
committer
Antoine Jacoutot
<ajacoutot@gnome.org>
Tue, 10 Jul 2012 13:14:52 +0000
(15:14 +0200)
glib/goption.c
patch
|
blob
|
history
diff --git
a/glib/goption.c
b/glib/goption.c
index
d34901e
..
4ebc560
100644
(file)
--- 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;