commit | b2724c87872aaec55dd7e5529aa029c3108b43a5 | [log] [tgz] |
---|---|---|
author | Jeff King <peff@peff.net> | Thu Jun 19 17:26:56 2014 -0400 |
committer | Junio C Hamano <gitster@pobox.com> | Thu Jun 19 15:20:54 2014 -0700 |
tree | 905e0c855f087699b8a5fd8054271a8e7c5d9dad | |
parent | 283101869bea8feb5d58f6ea1b568e9b197526d3 [diff] |
use xstrfmt to replace xmalloc + strcpy/strcat 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>