From f0047d2d943788fed2666e1d20c1e0d3c16701d5 Mon Sep 17 00:00:00 2001 From: John Keeping Date: Sat, 31 Mar 2018 14:57:22 +0100 Subject: ui-refs: remove unnecessary sanity check There is no way for refinfo::refname to be null, and Git will prevent zero-length refs so this check is unnecessary. Signed-off-by: John Keeping Reviewed-by: Christian Hesse --- ui-refs.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'ui-refs.c') diff --git a/ui-refs.c b/ui-refs.c index 50d9d30..7b95e8b 100644 --- a/ui-refs.c +++ b/ui-refs.c @@ -97,9 +97,6 @@ static void print_tag_downloads(const struct cgit_repo *repo, const char *ref) struct strbuf filename = STRBUF_INIT; size_t prefixlen; - if (!ref || strlen(ref) < 1) - return; - basename = cgit_snapshot_prefix(repo); if (starts_with(ref, basename)) strbuf_addstr(&filename, ref); -- cgit v1.2.3-24-g4f1b