]> git.ipfire.org Git - thirdparty/git.git/commit - http-push.c
drop strcpy in favor of raw sha1_to_hex
authorJeff King <peff@peff.net>
Thu, 24 Sep 2015 21:08:05 +0000 (17:08 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 5 Oct 2015 18:08:05 +0000 (11:08 -0700)
commit2b87d3a89633fb6078203a77d2610175f94cef95
treeec2dfe90aeb08635bbe14b1e51b1503e6acc1d40
parentd59f765ac9b3d6fc2e6bea262222b80493055f12
drop strcpy in favor of raw sha1_to_hex

In some cases where we strcpy() the result of sha1_to_hex(),
there's no need; the result goes directly into a printf
statement, and we can simply pass the return value from
sha1_to_hex() directly.

When this code was originally written, sha1_to_hex used a
single buffer, and it was not safe to use it twice within a
single expression. That changed as of dcb3450 (sha1_to_hex()
usage cleanup, 2006-05-03), but this code was never updated.

History-dug-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http-push.c
walker.c