Merge refs/heads/portable from http://www.cs.berkeley.edu/~ejr/gits/git.git
[git.git] / ls-files.c
index 2c7aada..0d79104 100644 (file)
@@ -205,7 +205,7 @@ static int excluded(const char *pathname)
 
 struct nond_on_fs {
        int len;
-       char name[0];
+       char name[];
 };
 
 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;