X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/2d5d9e243c91784909b11948894e3ba0989107c0..9f8418e870a70c264eda1598f2d470e5428c216d:/uip/mhparse.c diff --git a/uip/mhparse.c b/uip/mhparse.c index 49c1aba6..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; @@ -3665,7 +3663,7 @@ content_charset (CT ct) { ret_charset = get_param(ct->c_ctinfo.ci_first_pm, "charset", '?', 0); - return ret_charset ? ret_charset : getcpy ("US-ASCII"); + return ret_charset ? ret_charset : mh_xstrdup("US-ASCII"); } @@ -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);