Use #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano
2006-03-09 11:58:05 -08:00
parent 7bd7f2804d
commit b4f2a6ac92
5 changed files with 5 additions and 7 deletions

View File

@ -37,7 +37,7 @@ int execv_git_cmd(const char **argv)
getenv("GIT_EXEC_PATH"),
builtin_exec_path };
for (i = 0; i < sizeof(paths)/sizeof(paths[0]); ++i) {
for (i = 0; i < ARRAY_SIZE(paths); ++i) {
const char *exec_dir = paths[i];
const char *tmp;