]> diplodocus.org Git - nmh/blobdiff - sbr/trimcpy.c
uip: Replace some ints that are only ever 0 or 1 with bool.
[nmh] / sbr / trimcpy.c
index 50e7142e08aec696348e2135109d49d4249a2929..625c26c0ac0e022fff023db542293c05517fbd03 100644 (file)
@@ -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;