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

index 676ac49..f6bc8dc 100644 (file)
@@ -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);