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

index e948da9..57c6d39 100644 (file)
@@ -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);