aboutsummaryrefslogtreecommitdiff
path: root/diff-tree.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-tree.c
parent7ca45252a35df8c78060ff233957fc558714a5d6 (diff)
downloadgit-e99d59ff0bff349ef205cef1076e0354c8130680.tar.gz
git-e99d59ff0bff349ef205cef1076e0354c8130680.tar.xz
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-tree.c')
-rw-r--r--diff-tree.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/diff-tree.c b/diff-tree.c
index 3bf889987..5aa0d5e94 100644
--- a/diff-tree.c
+++ b/diff-tree.c
@@ -254,10 +254,10 @@ static int diff_tree_sha1(const unsigned char *old, const unsigned char *new, co
unsigned long size1, size2;
int retval;
- tree1 = read_object_with_reference(old, "tree", &size1, 0);
+ tree1 = read_object_with_reference(old, "tree", &size1, NULL);
if (!tree1)
die("unable to read source tree (%s)", sha1_to_hex(old));
- tree2 = read_object_with_reference(new, "tree", &size2, 0);
+ tree2 = read_object_with_reference(new, "tree", &size2, NULL);
if (!tree2)
die("unable to read destination tree (%s)", sha1_to_hex(new));
retval = diff_tree(tree1, size1, tree2, size2, base);
@@ -273,7 +273,7 @@ static int diff_tree_sha1_top(const unsigned char *old,
diff_setup(detect_rename, diff_score_opt, reverse_diff,
(generate_patch ? -1 : line_termination),
- 0, 0);
+ NULL, 0);
ret = diff_tree_sha1(old, new, base);
diff_flush();
return ret;
@@ -287,8 +287,8 @@ static int diff_root_tree(const unsigned char *new, const char *base)
diff_setup(detect_rename, diff_score_opt, reverse_diff,
(generate_patch ? -1 : line_termination),
- 0, 0);
- tree = read_object_with_reference(new, "tree", &size, 0);
+ NULL, 0);
+ tree = read_object_with_reference(new, "tree", &size, NULL);
if (!tree)
die("unable to read root tree (%s)", sha1_to_hex(new));
retval = diff_tree("", 0, tree, size, base);