summaryrefslogtreecommitdiff
path: root/tests/libgit2/odb/mixed.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2022-01-17 13:40:37 -0500
committerEdward Thomson <ethomson@edwardthomson.com>2022-06-14 22:29:57 -0400
commit0acaf3a8eb7c3276b7864df8f5588c7007b38f35 (patch)
treea5f6a678339651be6c9681f84a489950d34b9fb2 /tests/libgit2/odb/mixed.c
parentdbc4ac1c76827e954e0aa27afe8bb7e0b8993a93 (diff)
downloadlibgit2-0acaf3a8eb7c3276b7864df8f5588c7007b38f35.tar.gz
oid: define GIT_OID_SHA1_ZERO
Callers should not assume the layout of the oid structure; provide them a macro that defines the null / zero sha1 object id.
Diffstat (limited to 'tests/libgit2/odb/mixed.c')
-rw-r--r--tests/libgit2/odb/mixed.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/libgit2/odb/mixed.c b/tests/libgit2/odb/mixed.c
index cbab8e362..70eda8237 100644
--- a/tests/libgit2/odb/mixed.c
+++ b/tests/libgit2/odb/mixed.c
@@ -186,7 +186,7 @@ static void assert_found_objects(git_odb_expand_id *ids)
num = ARRAY_SIZE(expand_id_test_data);
for (i = 0; i < num; i++) {
- git_oid expected_id = {{0}};
+ git_oid expected_id = GIT_OID_SHA1_ZERO;
size_t expected_len = 0;
git_object_t expected_type = 0;
@@ -204,7 +204,7 @@ static void assert_found_objects(git_odb_expand_id *ids)
static void assert_notfound_objects(git_odb_expand_id *ids)
{
- git_oid expected_id = {{0}};
+ git_oid expected_id = GIT_OID_SHA1_ZERO;
size_t num, i;
num = ARRAY_SIZE(expand_id_test_data);