summaryrefslogtreecommitdiff
path: root/src/odb_pack.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2011-07-28 11:45:46 +0200
committerCarlos Martín Nieto <carlos@cmartin.tk>2011-08-02 21:42:03 +0200
commitb5b474dd0de88c0decd1bf6f4a4b202c8081bf43 (patch)
tree099cd324fdb774c89e352ae1a9394406c83b1d44 /src/odb_pack.c
parenta070f152bdeaeef61e7b0624231fe1d946b0043e (diff)
downloadlibgit2-b5b474dd0de88c0decd1bf6f4a4b202c8081bf43.tar.gz
Modify the given offset in git_packfile_unpack
The callers immediately throw away the offset, so we don't need any logical changes in any of them. This will be useful for the indexer, as it does need to know where the compressed data ends. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Diffstat (limited to 'src/odb_pack.c')
-rw-r--r--src/odb_pack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/odb_pack.c b/src/odb_pack.c
index a661c1c41..0d6bb05cc 100644
--- a/src/odb_pack.c
+++ b/src/odb_pack.c
@@ -389,7 +389,7 @@ int pack_backend__read(void **buffer_p, size_t *len_p, git_otype *type_p, git_od
if ((error = pack_entry_find(&e, (struct pack_backend *)backend, oid)) < GIT_SUCCESS)
return git__rethrow(error, "Failed to read pack backend");
- if ((error = git_packfile_unpack(&raw, e.p, e.offset)) < GIT_SUCCESS)
+ if ((error = git_packfile_unpack(&raw, e.p, &e.offset)) < GIT_SUCCESS)
return git__rethrow(error, "Failed to read pack backend");
*buffer_p = raw.data;
@@ -426,7 +426,7 @@ int pack_backend__read_prefix(
if ((error = pack_entry_find_prefix(&e, (struct pack_backend *)backend, short_oid, len)) < GIT_SUCCESS)
return git__rethrow(error, "Failed to read pack backend");
- if ((error = git_packfile_unpack(&raw, e.p, e.offset)) < GIT_SUCCESS)
+ if ((error = git_packfile_unpack(&raw, e.p, &e.offset)) < GIT_SUCCESS)
return git__rethrow(error, "Failed to read pack backend");
*buffer_p = raw.data;