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

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2017-06-16 02:15:46 +0300
committerJunio C Hamano <gitster@pobox.com>2017-06-16 22:44:03 +0300
commit6a83d902073803c4141e02c53decf8c03e35da27 (patch)
tree209cf1639a325875240fce3e1f1cabbdb25878df /branch.c
parentcf9f49ea4817b36e93e64909a918a912cc32c28b (diff)
coccinelle: make use of the "type" FREE_AND_NULL() rule
Apply the result of the just-added coccinelle rule. This manually excludes a few occurrences, mostly things that resulted in many FREE_AND_NULL() on one line, that'll be manually fixed in a subsequent change. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'branch.c')
-rw-r--r--branch.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/branch.c b/branch.c
index 985316eb76..2347cb8649 100644
--- a/branch.c
+++ b/branch.c
@@ -24,8 +24,7 @@ static int find_tracked_branch(struct remote *remote, void *priv)
} else {
free(tracking->spec.src);
if (tracking->src) {
- free(tracking->src);
- tracking->src = NULL;
+ FREE_AND_NULL(tracking->src);
}
}
tracking->spec.src = NULL;