X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/b66f48b0d0caea86ac3ae5e5044e3340be22f1a6..06efa573c7894caa4e5aa1ac7c64bd10ea25928b:/sbr/trimcpy.c diff --git a/sbr/trimcpy.c b/sbr/trimcpy.c index 50e7142e..625c26c0 100644 --- a/sbr/trimcpy.c +++ b/sbr/trimcpy.c @@ -1,6 +1,4 @@ - -/* - * trimcpy.c -- strip leading and trailing whitespace, +/* trimcpy.c -- strip leading and trailing whitespace, * -- replace internal whitespace with spaces, * -- then return a copy. * @@ -58,7 +56,7 @@ cpytrim (const char *sp) { /* skip over leading whitespace */ while (isspace ((unsigned char) *sp)) ++sp; - dp = add (sp, NULL); + dp = mh_xstrdup(sp); /* start at the end and zap trailing whitespace */ for (cp = dp + strlen (dp) - 1;