Author: Martins Polakovs <martins.polakovs@gmail.com>
Fix segfault on ppc when browsing tree
ui-blob.c | 2 +- ui-plain.c | 2 +- ui-tree.c | 2 +-
diff --git a/ui-blob.c b/ui-blob.c
index 2ccd31d2a19e5df1651cf2efff5952254cb3a0ad..89330ce5d12b6af662ed8a66d23262cf83d9152d 100644
--- a/ui-blob.c
+++ b/ui-blob.c
@@ -50,7 +50,7 @@ if((!hex) && type == OBJ_COMMIT && path) {
commit = lookup_commit_reference(sha1);
match_path = path;
matched_sha1 = sha1;
- read_tree_recursive(commit->tree, NULL, 0, 0, paths, walk_tree, NULL);
+ read_tree_recursive(commit->tree, "", 0, 0, paths, walk_tree, NULL);
type = sha1_object_info(sha1,&size);
}
diff --git a/ui-plain.c b/ui-plain.c
index a4ce077ac512f4735ea693967a5a0b375473bbf7..66cb19cdbd1058e37e60157c40a18d1a782bb3ff 100644
--- a/ui-plain.c
+++ b/ui-plain.c
@@ -88,7 +88,7 @@ html_status(404, "Not found", 0);
return;
}
match_path = ctx->qry.path;
- read_tree_recursive(commit->tree, NULL, 0, 0, paths, walk_tree, NULL);
+ read_tree_recursive(commit->tree, "", 0, 0, paths, walk_tree, NULL);
if (!match)
html_status(404, "Not found", 0);
}
diff --git a/ui-tree.c b/ui-tree.c
index f53ab6414b9ad50c8f4210eaab8afc169a5c4a00..a1647678ecac88798f0f784a386765a16de4a0e7 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -280,6 +280,6 @@ return;
}
match_path = path;
- read_tree_recursive(commit->tree, NULL, 0, 0, paths, walk_tree, NULL);
+ read_tree_recursive(commit->tree, "", 0, 0, paths, walk_tree, NULL);
ls_tail();
}