test/send-email: --[no-]xmailer tests
[gitweb.git] / pathspec.c
index 89f2c8ffff703b98f360590bfcecf165a6df4aef..9304ee33d75ab9de14e4a7b6dc96f5dd8028c464 100644 (file)
@@ -389,8 +389,7 @@ void parse_pathspec(struct pathspec *pathspec,
                if (!(flags & PATHSPEC_PREFER_CWD))
                        die("BUG: PATHSPEC_PREFER_CWD requires arguments");
 
-               pathspec->items = item = xmalloc(sizeof(*item));
-               memset(item, 0, sizeof(*item));
+               pathspec->items = item = xcalloc(1, sizeof(*item));
                item->match = prefix;
                item->original = prefix;
                item->nowildcard_len = item->len = strlen(prefix);