X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=apply.c;h=e87190ea3868f1379d557226e4779c36546ffe3e;hb=8c1f5f0f1f9c36ef5465512753efeff36758ba7d;hp=7c1a8411f21ee42d095e6c5a515987ef2a6f779a;hpb=35cc4bcd10862db190df9685b7ad221f2a25404f;p=git.git diff --git a/apply.c b/apply.c index 7c1a8411..e87190ea 100644 --- a/apply.c +++ b/apply.c @@ -387,7 +387,7 @@ static char *git_header_name(char *line) default: continue; case '\n': - break; + return NULL; case '\t': case ' ': second = name+len; for (;;) { @@ -1377,7 +1377,7 @@ static struct excludes { static int use_patch(struct patch *p) { - const char *pathname = p->new_name ? : p->old_name; + const char *pathname = p->new_name ? p->new_name : p->old_name; struct excludes *x = excludes; while (x) { if (fnmatch(x->path, pathname, 0) == 0)