"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Omar Polo <op@omarpolo.com>
Subject:
gotwebd: simplify bit of gotweb_process_request
To:
gameoftrees@openbsd.org
Date:
Sun, 04 Dec 2022 16:34:48 +0100

Download raw body.

Thread
i'd like to untagle this bit, ok?

diff /home/op/w/got
commit - 24b7de1c04072bf25db2df8acbf93a7ba7bbabfd
path + /home/op/w/got
blob - 9a3abd68641ab30d610ded5824470cdc62015474
file + gotwebd/gotweb.c
--- gotwebd/gotweb.c
+++ gotwebd/gotweb.c
@@ -185,15 +185,15 @@ gotweb_process_request(struct request *c)
 			goto err;
 		}
 		goto done;
-	} else {
+	}
+
 render:
-		error = gotweb_render_content_type(c, "text/html");
-		if (error) {
-			log_warnx("%s: %s", __func__, error->msg);
-			goto err;
-		}
-		html = 1;
+	error = gotweb_render_content_type(c, "text/html");
+	if (error) {
+		log_warnx("%s: %s", __func__, error->msg);
+		goto err;
 	}
+	html = 1;
 
 	error = gotweb_render_header(c);
 	if (error) {