[hackers] [PATCH v3][sbase] cmp: Make output of error message POSIX compliant

From: Richard Ipsum <richardipsum_AT_fastmail.co.uk>
Date: Mon, 20 May 2019 09:36:32 +0100

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>
---
 cmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmp.c b/cmp.c
index ea8902f..bb5c818 100644
--- a/cmp.c
+++ b/cmp.c
_AT_@ -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)]);
+				fprintf(stderr, "cmp: EOF on %s\n", argv[(b[0] != EOF)]);
 			same = 0;
 			break;
 		} else if (!lflag) {
-- 
2.21.0
Received on Mon May 20 2019 - 10:36:32 CEST

This archive was generated by hypermail 2.3.0 : Mon May 20 2019 - 11:24:23 CEST