summaryrefslogtreecommitdiff
path: root/show-index.c
diff options
context:
space:
mode:
Diffstat (limited to 'show-index.c')
-rw-r--r--show-index.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/show-index.c b/show-index.c
index 5a9eed7fd8..acf8d5445a 100644
--- a/show-index.c
+++ b/show-index.c
@@ -2,7 +2,7 @@
#include "pack.h"
static const char show_index_usage[] =
-"git show-index < <packed archive index>";
+"git show-index";
int main(int argc, char **argv)
{
@@ -50,7 +50,8 @@ int main(int argc, char **argv)
unsigned char sha1[20];
uint32_t crc;
uint32_t off;
- } *entries = xmalloc(nr * sizeof(entries[0]));
+ } *entries;
+ ALLOC_ARRAY(entries, nr);
for (i = 0; i < nr; i++)
if (fread(entries[i].sha1, 20, 1, stdin) != 1)
die("unable to read sha1 %u/%u", i, nr);