Start the great EXIT_{SUCCESS,FAILURE} migration.

This commit is contained in:
Matt Kraai 2000-09-22 03:45:34 +00:00
parent d995493987
commit 90f580ad5b
2 changed files with 8 additions and 6 deletions

View File

@ -34,7 +34,7 @@ extern int yes_main(int argc, char **argv)
while (1) while (1)
if (puts("y") == EOF) { if (puts("y") == EOF) {
perror("yes"); perror("yes");
exit(FALSE); return EXIT_FAILURE;
} }
} }
@ -43,7 +43,8 @@ extern int yes_main(int argc, char **argv)
if (fputs(argv[i], stdout) == EOF if (fputs(argv[i], stdout) == EOF
|| putchar(i == argc - 1 ? '\n' : ' ') == EOF) { || putchar(i == argc - 1 ? '\n' : ' ') == EOF) {
perror("yes"); perror("yes");
exit(FALSE); return EXIT_FAILURE;
} }
exit(TRUE);
return EXIT_SUCCESS;
} }

7
yes.c
View File

@ -34,7 +34,7 @@ extern int yes_main(int argc, char **argv)
while (1) while (1)
if (puts("y") == EOF) { if (puts("y") == EOF) {
perror("yes"); perror("yes");
exit(FALSE); return EXIT_FAILURE;
} }
} }
@ -43,7 +43,8 @@ extern int yes_main(int argc, char **argv)
if (fputs(argv[i], stdout) == EOF if (fputs(argv[i], stdout) == EOF
|| putchar(i == argc - 1 ? '\n' : ' ') == EOF) { || putchar(i == argc - 1 ? '\n' : ' ') == EOF) {
perror("yes"); perror("yes");
exit(FALSE); return EXIT_FAILURE;
} }
exit(TRUE);
return EXIT_SUCCESS;
} }