all repos — nimisewi_c @ 0846a40229ad8753419a0ab8a303d3a293df305e

simple random toki pona phrase generator

added missing error check to main and fixed error message in cgi

FossilOrigin-Name: e4d3b7cc592ac6f4eb64c16d4c24e88b04a1e5efe4aff54f6d9c48ac0a723eac
la-ninpre leobrekalini@gmail.com
Thu, 22 Jul 2021 07:23:54 +0000
commit

0846a40229ad8753419a0ab8a303d3a293df305e

parent

d6e630cd7e0dbbb117cfb9f0035412dc447f2dfb

2 files changed, 5 insertions(+), 1 deletions(-)

jump to
M cgi.ccgi.c

@@ -78,7 +78,7 @@

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();
M main.cmain.c

@@ -36,8 +36,12 @@ if (pledge("stdio", NULL) == -1) {

err(EXIT_FAILURE, "pledge"); } #endif + char *ns; ns = nimi_sewi(); + if (ns == NULL) { + err(EXIT_FAILURE, "memory allocation failed"); + } printf("%s\n", ns);