commit 53040766d1a09baa7412c73c9a93afac2bfd6acc
Author:     Richard Ipsum <[email protected]>
AuthorDate: Mon May 20 09:36:32 2019 +0100
Commit:     Michael Forney <[email protected]>
CommitDate: Wed Apr 12 21:37:04 2023 -0700

    cmp: Make output of error message POSIX compliant
    
    From POSIX:
    
    in the POSIX locale the following diagnostic message shall be written:
    
        "cmp: EOF on %s%s\n", <name of shorter file>, <additional info>
    
    Amended by mcf: kept weprintf for consistency with other diagnostic
    messages, but dropped the doubled prefix.

diff --git a/cmp.c b/cmp.c
index ea8902f..83ab149 100644
--- a/cmp.c
+++ b/cmp.c
@@ -57,7 +57,7 @@ main(int argc, char *argv[])
                        continue;
                } else if (b[0] == EOF || b[1] == EOF) {
                        if (!sflag)
-                               weprintf("cmp: EOF on %s\n", argv[(b[0] != 
EOF)]);
+                               weprintf("EOF on %s\n", argv[(b[0] != EOF)]);
                        same = 0;
                        break;
                } else if (!lflag) {

Reply via email to