aboutsummaryrefslogtreecommitdiffstats
path: root/cgi.c
diff options
context:
space:
mode:
Diffstat (limited to 'cgi.c')
-rw-r--r--cgi.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/cgi.c b/cgi.c
index 976bad9..e71df22 100644
--- a/cgi.c
+++ b/cgi.c
@@ -75,26 +75,23 @@ print_html_footer(void)
int
main(void)
{
+ char *ns;
+
#ifdef HAVE_PLEDGE
if (pledge("stdio", NULL) == -1) {
err(EXIT_FAILURE, "pledge");
}
#endif
- char *ns;
- ns = nimi_sewi();
- if (ns == NULL) {
- err(EXIT_FAILURE, "memory allocation failed");
- }
-
print_response_header();
print_html_header();
printf("<h1>");
+ ns = nimi_sewi();
printf("%s", ns);
+ weka_e_nimi_sewi(ns);
printf("</h1>\n");
- weka_e_nimi_sewi(ns);
print_html_footer();