From 32a1b0a803b168cc304a3c48d76d1c1ef7d0ad17 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Mon, 10 May 2004 17:40:08 +0000 Subject: [PATCH] (main): For failing cases, exit with `EXIT_FAILURE'. --- lib-src/ChangeLog | 4 ++++ lib-src/test-distrib.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 16db1575bee..8e20e219ee8 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +2004-05-10 Thien-Thi Nguyen + + * test-distrib.c (main): For failing cases, exit with `EXIT_FAILURE'. + 2004-05-10 Thien-Thi Nguyen * test-distrib.c: Conditionally include fcntl.h. diff --git a/lib-src/test-distrib.c b/lib-src/test-distrib.c index 9b720e1fc24..04dfe5caed8 100644 --- a/lib-src/test-distrib.c +++ b/lib-src/test-distrib.c @@ -79,13 +79,13 @@ main (argc, argv) if (argc != 2) { fprintf (stderr, "Usage: %s testfile\n", argv[0]); - exit (2); + exit (EXIT_FAILURE); } fd = open (argv[1], O_RDONLY); if (fd < 0) { perror (argv[1]); - exit (2); + exit (EXIT_FAILURE); } if (cool_read (fd, buf, sizeof string1) != sizeof string1 || strcmp (buf, string1) || @@ -96,7 +96,7 @@ main (argc, argv) Most likely this means that many nonprinting characters\n\ have been corrupted in the files of Emacs, and it will not work.\n", argv[1]); - exit (2); + exit (EXIT_FAILURE); } close (fd); return EXIT_SUCCESS; -- 2.39.2