]> diplodocus.org Git - nmh/commitdiff
Replace strchr() condition with TrimSuffixC().
authorRalph Corderoy <ralph@inputplus.co.uk>
Wed, 19 Oct 2016 09:06:24 +0000 (10:06 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Wed, 19 Oct 2016 09:12:01 +0000 (10:12 +0100)
uip/post.c

index d40f55e..13dbb58 100644 (file)
@@ -804,8 +804,7 @@ putfmt (char *name, char *str, int *eai, FILE *out)
               should never have reached this point.  Warn about any
               that are non-empty. */
            if (strcmp (str, "\n")) {
               should never have reached this point.  Warn about any
               that are non-empty. */
            if (strcmp (str, "\n")) {
-               char *newline = strchr (str, '\n');
-               if (newline) *newline = '\0';
+                TrimSuffixC(str, '\n');
                if (! whomsw) {
                    advise (NULL, "ignoring header line -- %s: %s", name, str);
                }
                if (! whomsw) {
                    advise (NULL, "ignoring header line -- %s: %s", name, str);
                }