Commit f4df82f9ff383429f028c1f2a3d33029674d60e3

Stefan Sperling 2020-01-29T13:35:58

simplify error return from pledge failure in gw_summary

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/gotweb/gotweb.c b/gotweb/gotweb.c
index bec7caa..32bae4b 100644
--- a/gotweb/gotweb.c
+++ b/gotweb/gotweb.c
@@ -698,11 +698,8 @@ gw_summary(struct gw_trans *gw_trans)
 	     *heads_html;
 	enum kcgi_err kerr;
 
-	if (pledge("stdio rpath proc exec sendfd unveil",
-	    NULL) == -1) {
-		error = got_error_from_errno("pledge");
-		return error;
-	}
+	if (pledge("stdio rpath proc exec sendfd unveil", NULL) == -1)
+		return got_error_from_errno("pledge");
 
 	/* unveil is applied with gw_briefs below */