From: Ralph Corderoy Date: Wed, 19 Oct 2016 09:04:59 +0000 (+0100) Subject: Replace strchr() condition with TrimSuffixC(). X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/9d9c66b78446aedbccc88d1313a4170e49d917dc?ds=sidebyside Replace strchr() condition with TrimSuffixC(). --- diff --git a/uip/mhstoresbr.c b/uip/mhstoresbr.c index 676ac49a..f6bc8dcb 100644 --- a/uip/mhstoresbr.c +++ b/uip/mhstoresbr.c @@ -1308,10 +1308,7 @@ clobber_check (char *original_file, mhstoreinfo_t info) { file = NULL; ++info->files_not_clobbered; } else { - char *newline = strchr (buf, '\n'); - if (newline) { - *newline = '\0'; - } + TrimSuffixC(buf, '\n'); } free (file);