Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-08-24 23:19:22 +0400
committerRussell Belfer <rb@github.com>2012-08-24 23:19:22 +0400
commit97a17e4e9fa5cafa531ff79cb88a9ee5c224a613 (patch)
treec45a8400538c843c74095ea30fd22e50caa1c502 /src/filebuf.c
parent5f4a61aea834fe25ce1596bc9c0e0b5e563aa98b (diff)
Fix valgrind warnings and spurious error messages
Just clean up valgrind warnings about uninitialized memory and also clear out errno in some cases where it results in a false error message being generated at a later point.
Diffstat (limited to 'src/filebuf.c')
-rw-r--r--src/filebuf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/filebuf.c b/src/filebuf.c
index 8b3ebb3e2..cfc8528e6 100644
--- a/src/filebuf.c
+++ b/src/filebuf.c
@@ -50,6 +50,7 @@ static int lock_file(git_filebuf *file, int flags)
if (flags & GIT_FILEBUF_FORCE)
p_unlink(file->path_lock);
else {
+ giterr_clear(); /* actual OS error code just confuses */
giterr_set(GITERR_OS,
"Failed to lock file '%s' for writing", file->path_lock);
return -1;