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.
This commit is contained in:
Richard Ipsum 2019-05-20 09:36:32 +01:00 committed by Michael Forney
parent 446903d688
commit 53040766d1
1 changed files with 1 additions and 1 deletions

2
cmp.c
View File

@ -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) {