diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2020-04-05 18:26:52 +0100 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2020-11-27 11:09:20 +0000 |
| commit | 7cd0bf65671a1a486242403aaa0237ed5dec9d2b (patch) | |
| tree | b75ce165cf71ed6d7e15275d30ddd3deb4af7c2b /src/indexer.c | |
| parent | 87d378961cc05daeefefdb1023a738249b8c6cf6 (diff) | |
| download | libgit2-7cd0bf65671a1a486242403aaa0237ed5dec9d2b.tar.gz | |
pack: use GIT_ASSERT
Diffstat (limited to 'src/indexer.c')
| -rw-r--r-- | src/indexer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/indexer.c b/src/indexer.c index b6a2ee45e..7b3db3101 100644 --- a/src/indexer.c +++ b/src/indexer.c @@ -900,8 +900,8 @@ static int inject_object(git_indexer *idx, git_oid *id) entry->crc = crc32(0L, Z_NULL, 0); /* Write out the object header */ - hdr_len = git_packfile__object_header(hdr, len, git_odb_object_type(obj)); - if ((error = append_to_pack(idx, hdr, hdr_len)) < 0) + if ((error = git_packfile__object_header(&hdr_len, hdr, len, git_odb_object_type(obj))) < 0 || + (error = append_to_pack(idx, hdr, hdr_len)) < 0) goto cleanup; idx->pack->mwf.size += hdr_len; |
