From: Ralph Corderoy Date: Tue, 18 Oct 2016 12:37:14 +0000 (+0100) Subject: Replace getcpy() with mh_xstrdup() where the string isn't NULL. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/c160a87394ae341395eba70fc54a2846d0cd86af?ds=inline Replace getcpy() with mh_xstrdup() where the string isn't NULL. --- diff --git a/sbr/readconfig.c b/sbr/readconfig.c index 1fe9d036..5b72113c 100644 --- a/sbr/readconfig.c +++ b/sbr/readconfig.c @@ -64,9 +64,9 @@ readconfig (struct node **npp, FILE *ib, const char *file, int ctx) NEW(np); *npp = np; *(npp = &np->n_next) = NULL; - np->n_name = getcpy (name); + np->n_name = mh_xstrdup(name); if (state == FLDPLUS) { - cp = getcpy (field); + cp = mh_xstrdup(field); while (state == FLDPLUS) { fieldsz = sizeof field; state = m_getfld (&gstate, name, field, &fieldsz, ib);