diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2022-01-21 19:49:09 -0500 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2022-04-10 15:56:57 -0400 |
commit | 590ff98166228638f9cf730aff7d5d044ce67f91 (patch) | |
tree | a9aa555bc4f331a79d22370b151aa01a43cf4fed /tests/libgit2/pack | |
parent | ab0421612f045fa2999296facb5fdab373bf7196 (diff) | |
download | libgit2-590ff98166228638f9cf730aff7d5d044ce67f91.tar.gz |
oid: don't assume the size of an oid
Don't assume that a `git_oid` is a particular size; allocate
`sizeof(git_oid)` instead.
Diffstat (limited to 'tests/libgit2/pack')
-rw-r--r-- | tests/libgit2/pack/packbuilder.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/libgit2/pack/packbuilder.c b/tests/libgit2/pack/packbuilder.c index f23579817..0889f46ed 100644 --- a/tests/libgit2/pack/packbuilder.c +++ b/tests/libgit2/pack/packbuilder.c @@ -68,7 +68,7 @@ static void seed_packbuilder(void) cl_git_pass(git_revwalk_push_ref(_revwalker, "HEAD")); while (git_revwalk_next(&oid, _revwalker) == 0) { - o = git__malloc(GIT_OID_RAWSZ); + o = git__malloc(sizeof(git_oid)); cl_assert(o != NULL); git_oid_cpy(o, &oid); cl_git_pass(git_vector_insert(&_commits, o)); |