summaryrefslogtreecommitdiff
path: root/src/odb_pack.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2015-06-09 16:53:07 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2015-06-09 16:53:07 +0200
commit02980bdca1c3398396466adff993746cac34fc08 (patch)
treed39d2f49e7f256ae00735a47f23320e37426b5f6 /src/odb_pack.c
parent81be2f467ce679e5e1a4b650ebdfc15ce3a9deb7 (diff)
downloadlibgit2-02980bdca1c3398396466adff993746cac34fc08.tar.gz
Initialize a few variables
Coverity complains about the git_rawobj ones because we use a loop in which we keep remembering the old version, and we end up copying our object as the base, so we want to have the data pointer be NULL.
Diffstat (limited to 'src/odb_pack.c')
-rw-r--r--src/odb_pack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/odb_pack.c b/src/odb_pack.c
index 1757cf920..735158d96 100644
--- a/src/odb_pack.c
+++ b/src/odb_pack.c
@@ -383,7 +383,7 @@ static int pack_backend__read_internal(
git_odb_backend *backend, const git_oid *oid)
{
struct git_pack_entry e;
- git_rawobj raw;
+ git_rawobj raw = {NULL};
int error;
if ((error = pack_entry_find(&e, (struct pack_backend *)backend, oid)) < 0 ||