aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cgi.c2
-rw-r--r--main.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/cgi.c b/cgi.c
index 0e67715..1e983a9 100644
--- a/cgi.c
+++ b/cgi.c
@@ -78,7 +78,7 @@ main(void)
char *ns;
ns = nimi_sewi();
if (ns == NULL) {
- err(EXIT_FAILURE, "memory could'n be allocated");
+ err(EXIT_FAILURE, "memory allocation failed");
}
print_response_header();
diff --git a/main.c b/main.c
index e254220..2aa851b 100644
--- a/main.c
+++ b/main.c
@@ -36,8 +36,12 @@ main(void)
err(EXIT_FAILURE, "pledge");
}
#endif
+
char *ns;
ns = nimi_sewi();
+ if (ns == NULL) {
+ err(EXIT_FAILURE, "memory allocation failed");
+ }
printf("%s\n", ns);