Commit f08447b045f0b36c3f6fb6186182c52e57c69680

Tracey Emery 2020-04-14T17:40:42

use khttp_printf where possible

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 193f892..13a6345 100644
--- a/gotweb/gotweb.c
+++ b/gotweb/gotweb.c
@@ -2350,10 +2350,8 @@ gw_template(size_t key, void *arg)
 			    KATTR_ID, "tmpl_err", KATTR__MAX);
 			if (kerr != KCGI_OK)
 				return 0;
-			kerr = khttp_puts(gw_trans->gw_req, "Error: ");
-			if (kerr != KCGI_OK)
-				return 0;
-			kerr = khttp_puts(gw_trans->gw_req, error->msg);
+			kerr = khttp_printf(gw_trans->gw_req, "Error: %s",
+			    error->msg);
 			if (kerr != KCGI_OK)
 				return 0;
 			kerr = khtml_closeelem(gw_trans->gw_html_req, 1);