Skip to content

Commit 4f5a427

Browse files
committed
Merge branch 'sb/hex-object-name-is-at-most-41-bytes-long'
Code clean-up. * sb/hex-object-name-is-at-most-41-bytes-long: hex.c: reduce memory footprint of sha1_to_hex static buffers
2 parents 1585dfe + 0b868f0 commit 4f5a427

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ int get_sha1_hex(const char *hex, unsigned char *sha1)
5959
char *sha1_to_hex(const unsigned char *sha1)
6060
{
6161
static int bufno;
62-
static char hexbuffer[4][50];
62+
static char hexbuffer[4][41];
6363
static const char hex[] = "0123456789abcdef";
6464
char *buffer = hexbuffer[3 & ++bufno], *buf = buffer;
6565
int i;

0 commit comments

Comments
 (0)