aboutsummaryrefslogtreecommitdiffstats
path: root/diff.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-20 11:46:10 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-20 11:46:10 -0700
commite99d59ff0bff349ef205cef1076e0354c8130680 (patch)
tree530ca0d4db45176dad22016af0e2d61c2a321c70 /diff.c
parent7ca45252a35df8c78060ff233957fc558714a5d6 (diff)
downloadgit-e99d59ff0bff349ef205cef1076e0354c8130680.tar.gz
sparse cleanup
Fix various things that sparse complains about: - use NULL instead of 0 - make sure we declare everything properly, or mark it static - use proper function declarations ("fn(void)" instead of "fn()") Sparse is always right.
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/diff.c b/diff.c
index eae2fc36e8..21771e7756 100644
--- a/diff.c
+++ b/diff.c
@@ -385,7 +385,7 @@ static void run_external_diff(const char *name,
*arg++ = temp[1].mode;
if (other)
*arg++ = other;
- *arg = 0;
+ *arg = NULL;
execvp(pgm, (char *const*) exec_arg);
}
else
@@ -504,7 +504,7 @@ static void free_data(struct diff_spec_hold *s)
else if (s->flags & SHOULD_MUNMAP)
munmap(s->data, s->size);
s->flags &= ~(SHOULD_FREE|SHOULD_MUNMAP);
- s->data = 0;
+ s->data = NULL;
}
static void flush_remaining_diff(struct diff_spec_hold *elem,
@@ -541,7 +541,7 @@ static int is_exact_match(struct diff_spec_hold *src,
return 0;
}
-int estimate_similarity(struct diff_spec_hold *src, struct diff_spec_hold *dst)
+static int estimate_similarity(struct diff_spec_hold *src, struct diff_spec_hold *dst)
{
/* src points at a deleted file and dst points at a created
* file. They may be quite similar, in which case we want to