aboutsummaryrefslogtreecommitdiffstats
path: root/ui-blob.c
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2015-10-08 23:23:58 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2015-10-09 10:54:38 +0200
commit509488d85c06c66eb65bc4809f6e317c1ebe1d7a (patch)
tree9debf4331a55d57a74338abbf97d1619be20e39d /ui-blob.c
parent687cdf69689edcaff8e9035af93baf1a9e71cf32 (diff)
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>
Diffstat (limited to 'ui-blob.c')
-rw-r--r--ui-blob.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui-blob.c b/ui-blob.c
index b333f86..d3c3a10 100644
--- a/ui-blob.c
+++ b/ui-blob.c
@@ -85,7 +85,7 @@ int cgit_print_file(char *path, const char *head, int file_only)
if (get_sha1(head, sha1))
return -1;
type = sha1_object_info(sha1, &size);
- if (type == OBJ_COMMIT && path) {
+ if (type == OBJ_COMMIT) {
commit = lookup_commit_reference(sha1);
read_tree_recursive(commit->tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx);
if (!walk_tree_ctx.found_path)