From: Ralph Corderoy Date: Mon, 17 Oct 2016 00:28:13 +0000 (+0100) Subject: Replace mh_xmalloc() with mh_xstrdup(). X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/6eb1f7c57d8343e61a1130491d08fd821746adc9?ds=inline Replace mh_xmalloc() with mh_xstrdup(). --- diff --git a/sbr/mts.c b/sbr/mts.c index cbff0db4..285ced5d 100644 --- a/sbr/mts.c +++ b/sbr/mts.c @@ -170,7 +170,6 @@ tailor_value (char *s) int i, r; char *bp; char buffer[BUFSIZ]; - size_t len; for (bp = buffer; *s; bp++, s++) { if (*s != QUOTE) { @@ -203,11 +202,7 @@ tailor_value (char *s) } *bp = 0; - len = strlen (buffer) + 1; - bp = mh_xmalloc (len); - memcpy (bp, buffer, len); - - return bp; + return mh_xstrdup(buffer); } /*