diff options
author | John Keeping | 2015-10-08 23:23:58 +0100 |
---|---|---|
committer | Jason A. Donenfeld | 2015-10-09 10:54:38 +0200 |
commit | 509488d85c06c66eb65bc4809f6e317c1ebe1d7a (patch) | |
tree | 9debf4331a55d57a74338abbf97d1619be20e39d | |
parent | 687cdf69689edcaff8e9035af93baf1a9e71cf32 (diff) | |
download | cgit-509488d85c06c66eb65bc4809f6e317c1ebe1d7a.tar.gz cgit-509488d85c06c66eb65bc4809f6e317c1ebe1d7a.tar.bz2 cgit-509488d85c06c66eb65bc4809f6e317c1ebe1d7a.zip |
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>
-rw-r--r-- | ui-blob.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -85,7 +85,7 @@ int cgit_print_file(char *path, const char *head, int file_only) | |||
85 | if (get_sha1(head, sha1)) | 85 | if (get_sha1(head, sha1)) |
86 | return -1; | 86 | return -1; |
87 | type = sha1_object_info(sha1, &size); | 87 | type = sha1_object_info(sha1, &size); |
88 | if (type == OBJ_COMMIT && path) { | 88 | if (type == OBJ_COMMIT) { |
89 | commit = lookup_commit_reference(sha1); | 89 | commit = lookup_commit_reference(sha1); |
90 | read_tree_recursive(commit->tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx); | 90 | read_tree_recursive(commit->tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx); |
91 | if (!walk_tree_ctx.found_path) | 91 | if (!walk_tree_ctx.found_path) |