Commit 97a19438305ebc4e0078852274b23dfe1c8f615d

Stefan Sperling 2020-02-17T20:34:40

got_ref_get_name() cannot fail

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/gotweb/gotweb.c b/gotweb/gotweb.c
index 866c545..a884509 100644
--- a/gotweb/gotweb.c
+++ b/gotweb/gotweb.c
@@ -3986,11 +3986,6 @@ gw_output_repo_heads(struct gw_trans *gw_trans)
 			continue;
 
 		refname = got_ref_get_name(re->ref);
-		if (refname == NULL) {
-			error = got_error_from_errno("got_ref_to_str");
-			goto done;
-		}
-
 		if (strncmp(refname, "refs/heads/", 11) != 0)
 			continue;