From: Ralph Corderoy Date: Wed, 19 Oct 2016 09:04:12 +0000 (+0100) Subject: Replace strchr() condition with TrimSuffixC(). X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/4fab388731424637f56bc87214ecd950189a9adc?hp=6d631a50b61036912683003bc53d92be05576630 Replace strchr() condition with TrimSuffixC(). --- diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c index e948da94..57c6d397 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -545,7 +545,7 @@ static void mhl_format (char *file, int length, int width) { int i; - char *bp, *cp, **ip; + char *bp, **ip; char *ap, name[NAMESZ]; struct mcomp *c1; struct stat st; @@ -591,8 +591,7 @@ mhl_format (char *file, int length, int width) if (*bp == ';') continue; - if ((cp = strchr(bp, '\n'))) - *cp = 0; + TrimSuffixC(bp, '\n'); if (*bp == ':') { (void) add_queue (&fmthd, &fmttl, NULL, bp + 1, CLEARTEXT);