diff options
author | Junio C Hamano <junkio@cox.net> | 2006-03-09 11:58:05 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-03-09 11:58:05 -0800 |
commit | b4f2a6ac9263d6e9bf3bf9c8abe607cd6def0ee8 (patch) | |
tree | 7956fa207bb2aa7eaee0290c2f8cbf11b1feaf6e /apply.c | |
parent | 7bd7f2804d84258a5cd1e76c610496f6beaa4cdf (diff) | |
download | git-b4f2a6ac9263d6e9bf3bf9c8abe607cd6def0ee8.tar.gz |
Use #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'apply.c')
-rw-r--r-- | apply.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -651,7 +651,7 @@ static int parse_git_header(char *line, int len, unsigned int size, struct patch len = linelen(line, size); if (!len || line[len-1] != '\n') break; - for (i = 0; i < sizeof(optable) / sizeof(optable[0]); i++) { + for (i = 0; i < ARRAY_SIZE(optable); i++) { const struct opentry *p = optable + i; int oplen = strlen(p->str); if (len < oplen || memcmp(p->str, line, oplen)) |