ui-blob: remove useless null check
We have already called strlen() on "path" by the time we get here, so we know it can't be null. Coverity-id: 13954 Signed-off-by: John Keeping <john@keeping.me.uk>
This commit is contained in:
parent
687cdf6968
commit
509488d85c
@ -85,7 +85,7 @@ int cgit_print_file(char *path, const char *head, int file_only)
|
|||||||
if (get_sha1(head, sha1))
|
if (get_sha1(head, sha1))
|
||||||
return -1;
|
return -1;
|
||||||
type = sha1_object_info(sha1, &size);
|
type = sha1_object_info(sha1, &size);
|
||||||
if (type == OBJ_COMMIT && path) {
|
if (type == OBJ_COMMIT) {
|
||||||
commit = lookup_commit_reference(sha1);
|
commit = lookup_commit_reference(sha1);
|
||||||
read_tree_recursive(commit->tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx);
|
read_tree_recursive(commit->tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx);
|
||||||
if (!walk_tree_ctx.found_path)
|
if (!walk_tree_ctx.found_path)
|
||||||
|
Loading…
Reference in New Issue
Block a user