summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-03-09 19:58:05 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-03-09 19:58:05 (GMT)
commitb4f2a6ac9263d6e9bf3bf9c8abe607cd6def0ee8 (patch)
tree7956fa207bb2aa7eaee0290c2f8cbf11b1feaf6e /git-compat-util.h
parent7bd7f2804d84258a5cd1e76c610496f6beaa4cdf (diff)
downloadgit-b4f2a6ac9263d6e9bf3bf9c8abe607cd6def0ee8.zip
git-b4f2a6ac9263d6e9bf3bf9c8abe607cd6def0ee8.tar.gz
git-b4f2a6ac9263d6e9bf3bf9c8abe607cd6def0ee8.tar.bz2
Use #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index f982b8e..5d543d2 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -9,6 +9,8 @@
#endif
#endif
+#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
+
#include <unistd.h>
#include <stdio.h>
#include <sys/stat.h>