X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=ls-files.c;h=e53d245884ab14f85824fd6c1b891481c8b1f849;hb=6511cce24b932eba33d8e13b54664673121a8b7e;hp=56f3919e069eb7390ff1f06ff25a0cc9c420e8a8;hpb=6c5f9baa3bc0d63e141e0afc23110205379905a4;p=git.git diff --git a/ls-files.c b/ls-files.c index 56f3919e..e53d2458 100644 --- a/ls-files.c +++ b/ls-files.c @@ -205,7 +205,7 @@ static int excluded(const char *pathname) struct nond_on_fs { int len; - char name[]; + char name[0]; }; static struct nond_on_fs **dir; @@ -496,7 +496,7 @@ static void verify_pathspec(void) char c = n[i]; if (prev && prev[i] != c) break; - if (c == '*' || c == '?') + if (!c || c == '*' || c == '?') break; if (c == '/') len = i+1;