Commit 82050fa1 by Edward Thomson

mempack functions: return an int

Stop returning a void for functions, future-proofing them to allow them
to fail.
parent a3126a72
......@@ -78,8 +78,9 @@ GIT_EXTERN(int) git_mempack_dump(git_buf *pack, git_repository *repo, git_odb_ba
* semantics to the Git repository.
*
* @param backend The mempack backend
* @return 0 on success; error code otherwise
*/
GIT_EXTERN(void) git_mempack_reset(git_odb_backend *backend);
GIT_EXTERN(int) git_mempack_reset(git_odb_backend *backend);
GIT_END_DECL
......
......@@ -125,7 +125,7 @@ cleanup:
return err;
}
void git_mempack_reset(git_odb_backend *_backend)
int git_mempack_reset(git_odb_backend *_backend)
{
struct memory_packer_db *db = (struct memory_packer_db *)_backend;
struct memobject *object = NULL;
......@@ -137,6 +137,8 @@ void git_mempack_reset(git_odb_backend *_backend)
git_array_clear(db->commits);
git_oidmap_clear(db->objects);
return 0;
}
static void impl__free(git_odb_backend *_backend)
......
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