From e99d59ff0bff349ef205cef1076e0354c8130680 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 20 May 2005 11:46:10 -0700 Subject: 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. --- diff.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'diff.c') 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 -- cgit v1.2.3