Commit 9133a7e62336b72876c524528a6319d94df3086d

Tracey Emery 2020-02-09T19:04:00

simplify asprintf error return

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/gotweb/gotweb.c b/gotweb/gotweb.c
index dfd6ac7..01741fc 100644
--- a/gotweb/gotweb.c
+++ b/gotweb/gotweb.c
@@ -645,10 +645,8 @@ gw_index(struct gw_trans *gw_trans)
 			return gw_kcgi_error(kerr);
 
 		if (asprintf(&href_summary, "?path=%s&action=summary",
-		    gw_dir->name) == -1) {
-			error = got_error_from_errno("asprintf");
-			return error;
-		}
+		    gw_dir->name) == -1)
+			return got_error_from_errno("asprintf");
 		kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV, KATTR_ID,
 		    "index_project", KATTR__MAX);
 		if (kerr != KCGI_OK)