X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=apply.c;h=179b3bbd00fc6da726491639920ba6540c9b3c71;hb=4c2e98d6ce47aa9fcc1598c68e630f371cd4f8cb;hp=c3699668671706d35b84d78cfa6ccee675f684b4;hpb=8273c79ae2e6b782dba3dccb815b386cc83e4294;p=git.git diff --git a/apply.c b/apply.c index c3699668..179b3bbd 100644 --- a/apply.c +++ b/apply.c @@ -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)) @@ -1402,7 +1402,8 @@ static int check_patch(struct patch *patch) costate.not_new = 0; costate.refresh_cache = 1; if (checkout_entry(active_cache[pos], - &costate) || + &costate, + NULL) || lstat(old_name, &st)) return -1; }