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/pack-objects.c | |
| parent | 87d378961cc05daeefefdb1023a738249b8c6cf6 (diff) | |
| download | libgit2-7cd0bf65671a1a486242403aaa0237ed5dec9d2b.tar.gz | |
pack: use GIT_ASSERT
Diffstat (limited to 'src/pack-objects.c')
| -rw-r--r-- | src/pack-objects.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/pack-objects.c b/src/pack-objects.c index 9679e8e23..abc636b5b 100644 --- a/src/pack-objects.c +++ b/src/pack-objects.c @@ -347,10 +347,9 @@ static int write_object( } /* Write header */ - hdr_len = git_packfile__object_header(hdr, data_len, type); - - if ((error = write_cb(hdr, hdr_len, cb_data)) < 0 || - (error = git_hash_update(&pb->ctx, hdr, hdr_len)) < 0) + if ((error = git_packfile__object_header(&hdr_len, hdr, data_len, type)) < 0 || + (error = write_cb(hdr, hdr_len, cb_data)) < 0 || + (error = git_hash_update(&pb->ctx, hdr, hdr_len)) < 0) goto done; if (type == GIT_OBJECT_REF_DELTA) { |
