diff --git a/usr.bin/diff3/diff3.c b/usr.bin/diff3/diff3.c --- a/usr.bin/diff3/diff3.c +++ b/usr.bin/diff3/diff3.c @@ -565,7 +565,7 @@ for (n = 0; cline[i] < from - 1; n += j) { if ((line = get_line(fp[i], &j)) == NULL) - errx(EXIT_FAILURE, "logic error"); + errx(1, "logic error"); if (pr != NULL) printf("%s%s", Tflag == 1 ? "\t" : pr, line); cline[i]++; @@ -596,7 +596,7 @@ if (c == -1 && d == -1) break; if (c == -1 || d == -1) - errx(EXIT_FAILURE, "logic error"); + errx(1, "logic error"); nchar++; if (c != d) { repos(nchar); @@ -657,7 +657,7 @@ return; if (r->from > r->to) - errx(EXIT_FAILURE, "invalid print range"); + errx(1, "invalid print range"); /* * XXX-THJ: We read through all of the file for each range printed. @@ -872,8 +872,7 @@ } break; default: - printf("Error: Unhandled diff type - exiting\n"); - exit(EXIT_FAILURE); + __unreachable(); } if (de[n].type == DIFF_TYPE2) @@ -1109,5 +1108,5 @@ merge(m, n); - return (EXIT_SUCCESS); + exit(0); }