From: Ralph Corderoy Date: Mon, 17 Oct 2016 00:41:32 +0000 (+0100) Subject: Replace NEW() then memset() of 0 with NEW0(). X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/1af33bc5b6f8b127b2bcd68804d32ecac3ee5943 Replace NEW() then memset() of 0 with NEW0(). --- diff --git a/uip/mhparse.c b/uip/mhparse.c index 059d112c..7b1352aa 100644 --- a/uip/mhparse.c +++ b/uip/mhparse.c @@ -3537,8 +3537,7 @@ bad_quote: } if (pp == NULL) { - NEW(pp); - memset(pp, 0, sizeof(*pp)); + NEW0(pp); pp->name = nameptr; pp->next = phead; phead = pp; @@ -3548,8 +3547,7 @@ bad_quote: * Insert this into the section linked list */ - NEW(sp); - memset(sp, 0, sizeof(*sp)); + NEW0(sp); sp->value = valptr; sp->index = index; sp->len = len; @@ -4084,8 +4082,7 @@ add_param(PM *first, PM *last, char *name, char *value, int nocopy) { PM pm; - NEW(pm); - memset(pm, 0, sizeof(*pm)); + NEW0(pm); pm->pm_name = nocopy ? name : getcpy(name); pm->pm_value = nocopy ? value : getcpy(value);