From: Ralph Corderoy Date: Tue, 18 Oct 2016 13:52:25 +0000 (+0100) Subject: Replace getcpy() with mh_xstrdup() where the string isn't NULL. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/0ba4a551bdbb6db996f58cb327f9d297c1b5ff09?ds=inline;hp=fa84a13141e054c3d519b75a3b41bc448420ba7e Replace getcpy() with mh_xstrdup() where the string isn't NULL. --- diff --git a/uip/dp.c b/uip/dp.c index 6909239b..923d49d3 100644 --- a/uip/dp.c +++ b/uip/dp.c @@ -8,6 +8,7 @@ */ #include +#include #include #include @@ -144,7 +145,7 @@ process (char *date, int length) if (cptr) { if (cptr->c_text) free(cptr->c_text); - cptr->c_text = getcpy(date); + cptr->c_text = mh_xstrdup(date); } fmt_scan (fmt, scanl, length, dat, NULL); fputs (charstring_buffer (scanl), stdout);