From dbc4ac1c76827e954e0aa27afe8bb7e0b8993a93 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Sat, 22 Jan 2022 23:10:03 -0500 Subject: oid: `GIT_OID_*SZ` is now `GIT_OID_SHA1_*SIZE` In preparation for SHA256 support, `GIT_OID_RAWSZ` and `GIT_OID_HEXSZ` need to indicate that they're the size of _SHA1_ OIDs. --- tests/libgit2/core/oidmap.c | 2 +- tests/libgit2/core/pool.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/libgit2/core') diff --git a/tests/libgit2/core/oidmap.c b/tests/libgit2/core/oidmap.c index 7f98287a6..6854e3432 100644 --- a/tests/libgit2/core/oidmap.c +++ b/tests/libgit2/core/oidmap.c @@ -17,7 +17,7 @@ void test_core_oidmap__initialize(void) test_oids[i].extra = i; - for (j = 0; j < GIT_OID_RAWSZ / 4; ++j) { + for (j = 0; j < GIT_OID_SHA1_SIZE / 4; ++j) { test_oids[i].oid.id[j * 4 ] = (unsigned char)modi; test_oids[i].oid.id[j * 4 + 1] = (unsigned char)(modi >> 8); test_oids[i].oid.id[j * 4 + 2] = (unsigned char)(modi >> 16); diff --git a/tests/libgit2/core/pool.c b/tests/libgit2/core/pool.c index 5746e35b8..af132132a 100644 --- a/tests/libgit2/core/pool.c +++ b/tests/libgit2/core/pool.c @@ -7,7 +7,7 @@ static char to_hex[] = "0123456789abcdef"; void test_core_pool__oid(void) { git_pool p; - char oid_hex[GIT_OID_HEXSZ]; + char oid_hex[GIT_OID_SHA1_HEXSIZE]; git_oid *oid; int i, j; -- cgit v1.2.1