From: Ralph Corderoy Date: Wed, 19 Oct 2016 09:06:24 +0000 (+0100) Subject: Replace strchr() condition with TrimSuffixC(). X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/23a0ebb69f4a7ad12eddb474f65c0a3bf800587b?ds=inline Replace strchr() condition with TrimSuffixC(). --- diff --git a/uip/post.c b/uip/post.c index d40f55ef..13dbb58a 100644 --- a/uip/post.c +++ b/uip/post.c @@ -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")) { - char *newline = strchr (str, '\n'); - if (newline) *newline = '\0'; + TrimSuffixC(str, '\n'); if (! whomsw) { advise (NULL, "ignoring header line -- %s: %s", name, str); }