use xstrfmt to replace xmalloc + strcpy/strcat
authorJeff King <peff@peff.net>
Thu, 19 Jun 2014 21:26:56 +0000 (17:26 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 19 Jun 2014 22:20:54 +0000 (15:20 -0700)
It's easy to get manual allocation calculations wrong, and
the use of strcpy/strcat raise red flags for people looking
for buffer overflows (though in this case each site was
fine).

It's also shorter to use xstrfmt, and the printf-format
tends to be easier for a reader to see what the final string
will look like.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found