From 23a0ebb69f4a7ad12eddb474f65c0a3bf800587b Mon Sep 17 00:00:00 2001 From: Ralph Corderoy Date: Wed, 19 Oct 2016 10:06:24 +0100 Subject: [PATCH] Replace strchr() condition with TrimSuffixC(). --- uip/post.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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); } -- 2.56.0