summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-05-30 13:06:34 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2014-05-30 13:06:34 +0200
commit5f0527aeac65b10b0df9034f5763865d253daf75 (patch)
treebb711d4031cbcd1d6c2da24a2f020df2d043d9d5
parent19d77ce10937a5b86e114192f816fef9ba7e23b3 (diff)
downloadlibgit2-5f0527aeac65b10b0df9034f5763865d253daf75.tar.gz
config: initialize the error
The error would be uninitialized if we take a snapshot of a config with no backends.
-rw-r--r--src/config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c
index 4bd27a875..8a0fb653c 100644
--- a/src/config.c
+++ b/src/config.c
@@ -139,7 +139,7 @@ int git_config_open_ondisk(git_config **out, const char *path)
int git_config_snapshot(git_config **out, git_config *in)
{
- int error;
+ int error = 0;
size_t i;
file_internal *internal;
git_config *config;