diff options
| author | Faraz Vahedi <kfv@kfv.io> | 2024-10-27 08:59:39 +0000 |
|---|---|---|
| committer | Mariusz Zaborski <oshogbo@FreeBSD.org> | 2024-11-27 12:20:11 +0000 |
| commit | fc26f24b3ef276b2a9f73c9778aecff7377b1aeb (patch) | |
| tree | 37e940b2c1b831b7afa8d187216287e10d847b25 /usr.bin | |
| parent | f3b371f4d938c09c4cdc8fd95b4b52e1d8dd41dd (diff) | |
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/colrm/colrm.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/usr.bin/colrm/colrm.c b/usr.bin/colrm/colrm.c index ffedc429eeb1..7f758b9cfbc6 100644 --- a/usr.bin/colrm/colrm.c +++ b/usr.bin/colrm/colrm.c @@ -68,12 +68,12 @@ main(int argc, char *argv[]) case 2: stop = strtol(argv[1], &p, 10); if (stop <= 0 || *p) - errx(1, "illegal column -- %s", argv[1]); + errx(EXIT_FAILURE, "illegal column -- %s", argv[1]); /* FALLTHROUGH */ case 1: start = strtol(argv[0], &p, 10); if (start <= 0 || *p) - errx(1, "illegal column -- %s", argv[0]); + errx(EXIT_FAILURE, "illegal column -- %s", argv[0]); break; case 0: break; @@ -82,7 +82,7 @@ main(int argc, char *argv[]) } if (stop && start > stop) - errx(1, "illegal start and stop columns"); + errx(EXIT_FAILURE, "illegal start and stop columns"); for (column = 0;;) { switch (ch = getwchar()) { @@ -115,15 +115,14 @@ void check(FILE *stream) { if (feof(stream)) - exit(0); + exit(EXIT_SUCCESS); if (ferror(stream)) - err(1, "%s", stream == stdin ? "stdin" : "stdout"); + err(EXIT_FAILURE, "%s", stream == stdin ? "stdin" : "stdout"); } void usage(void) { (void)fprintf(stderr, "usage: colrm [start [stop]]\n"); - exit(1); + exit(EXIT_FAILURE); } - |
