summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--ext/etc/etc.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c291f55..93a9d81 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Feb 9 00:47:18 2011 Tanaka Akira <akr@fsij.org>
+
+ * ext/etc/etc.c: parenthesize macro arguments.
+
Tue Feb 8 19:38:00 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* misc/ruby-mode.el (ruby-expr-beg): fix for invalid nest errors.
diff --git a/ext/etc/etc.c b/ext/etc/etc.c
index 9f2b459..2bd2e30 100644
--- a/ext/etc/etc.c
+++ b/ext/etc/etc.c
@@ -557,7 +557,7 @@ etc_getgrent(VALUE obj)
return Qnil;
}
-#define numberof(array) (sizeof(array) / sizeof(*array))
+#define numberof(array) (sizeof(array) / sizeof(*(array)))
#ifdef _WIN32
VALUE rb_w32_special_folder(int type);