]> diplodocus.org Git - nmh/commitdiff
Replace mh_xmalloc() with mh_xstrdup().
authorRalph Corderoy <ralph@inputplus.co.uk>
Mon, 17 Oct 2016 00:28:13 +0000 (01:28 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Mon, 17 Oct 2016 00:28:13 +0000 (01:28 +0100)
sbr/mts.c

index cbff0db..285ced5 100644 (file)
--- 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);
 }
 
 /*