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>2013-02-16 04:02:45 +0400
committerRussell Belfer <rb@github.com>2013-02-16 04:02:45 +0400
commit56543a609aa7adb14b308046445ddd48f44322b7 (patch)
treeda381d33ee3e01de4f957bf748dacb749a55be3a /src/notes.c
parent71d62d3905723c0263ca00a1d68825e2c35fb987 (diff)
Clear up warnings from cppcheck
The cppcheck static analyzer generates warnings for a bunch of places in the libgit2 code base. All the ones fixed in this commit are actually false positives, but I've reorganized the code to hopefully make it easier for static analysis tools to correctly understand the structure. I wouldn't do this if I felt like it was making the code harder to read or worse for humans, but in this case, these fixes don't seem too bad and will hopefully make it easier for better analysis tools to get at any real issues.
Diffstat (limited to 'src/notes.c')
-rw-r--r--src/notes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/notes.c b/src/notes.c
index eff80bc82..f5537db3f 100644
--- a/src/notes.c
+++ b/src/notes.c
@@ -147,7 +147,7 @@ static int manipulate_note_in_tree_r(
int fanout,
int current_error))
{
- int error = -1;
+ int error;
git_tree *subtree = NULL, *new = NULL;
char subtree_name[3];