Commit b169cd52 by Patrick Steinhardt

pack-objects: check return code of `git_zstream_set_input`

While `git_zstream_set_input` cannot fail right now, it might change in
the future if we ever decide to have it check its parameters more
vigorously. Let's thus check whether its return code signals an error.
parent 90450d88
......@@ -374,7 +374,9 @@ static int write_object(
GIT_ERROR_CHECK_ALLOC(zbuf);
git_zstream_reset(&pb->zstream);
git_zstream_set_input(&pb->zstream, data, data_len);
if ((error = git_zstream_set_input(&pb->zstream, data, data_len)) < 0)
goto done;
while (!git_zstream_done(&pb->zstream)) {
if ((error = git_zstream_get_output(zbuf, &zbuf_len, &pb->zstream)) < 0 ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment