diff --git a/man2/select_tut.2 b/man2/select_tut.2 index fc1911b34..e02e7e8fd 100644 --- a/man2/select_tut.2 +++ b/man2/select_tut.2 @@ -458,7 +458,7 @@ main(int argc, char **argv) fprintf(stderr, "Usage\\n\\tfwd " " \\n"); - exit(1); + exit(EXIT_FAILURE); } signal(SIGPIPE, SIG_IGN); @@ -467,7 +467,7 @@ main(int argc, char **argv) h = listen_socket(atoi(argv[1])); if (h < 0) - exit(1); + exit(EXIT_FAILURE); for (;;) { int r, nfds = 0; @@ -510,7 +510,7 @@ main(int argc, char **argv) continue; if (r < 0) { perror("select()"); - exit(1); + exit(EXIT_FAILURE); } if (FD_ISSET(h, &rd)) { unsigned int l; diff --git a/man3/dlopen.3 b/man3/dlopen.3 index 5c6ff8c2f..c9ba55285 100644 --- a/man3/dlopen.3 +++ b/man3/dlopen.3 @@ -377,7 +377,7 @@ main(int argc, char **argv) handle = dlopen("libm.so", RTLD_LAZY); if (!handle) { fprintf(stderr, "%s\en", dlerror()); - exit(1); + exit(EXIT_FAILURE); } dlerror(); /* Clear any existing error */ @@ -386,7 +386,7 @@ main(int argc, char **argv) *(void **) (&cosine) = dlsym(handle, "cos"); if ((error = dlerror()) != NULL) { fprintf(stderr, "%s\en", error); - exit(1); + exit(EXIT_FAILURE); } printf("%f\en", (*cosine)(2.0)); diff --git a/man3/getgrent_r.3 b/man3/getgrent_r.3 index 043f8974b..9b86c24b7 100644 --- a/man3/getgrent_r.3 +++ b/man3/getgrent_r.3 @@ -138,7 +138,7 @@ main(void) .\" if (i == ENOENT) .\" break; .\" printf("getgrent_r: %s", strerror(i)); -.\" exit(1); +.\" exit(EXIT_FAILURE); .\" } .SH "CONFORMING TO" These functions are GNU extensions, done in a style resembling diff --git a/man3/getopt.3 b/man3/getopt.3 index 93f6ef1e3..1049f5f17 100644 --- a/man3/getopt.3 +++ b/man3/getopt.3 @@ -428,7 +428,7 @@ main(int argc, char **argv) printf("\\n"); } - exit(0); + exit(EXIT_SUCCESS); } .fi .SH BUGS diff --git a/man3/getpwent_r.3 b/man3/getpwent_r.3 index df8a528a4..91e9f30fa 100644 --- a/man3/getpwent_r.3 +++ b/man3/getpwent_r.3 @@ -135,7 +135,7 @@ main(void) .\" if (i == ENOENT) .\" break; .\" printf("getpwent_r: %s", strerror(i)); -.\" exit(1); +.\" exit(EXIT_SUCCESS); .\" } .SH "CONFORMING TO" These functions are GNU extensions, done in a style resembling diff --git a/man3/hsearch.3 b/man3/hsearch.3 index 00089d877..01c7357bd 100644 --- a/man3/hsearch.3 +++ b/man3/hsearch.3 @@ -197,7 +197,7 @@ main(void) /* there should be no failures */ if (ep == NULL) { fprintf(stderr, "entry failed\\n"); - exit(1); + exit(EXIT_FAILURE); } } for (i = 22; i < 26; i++) { diff --git a/man3/tsearch.3 b/man3/tsearch.3 index b7b3cccd4..e2ae9d23c 100644 --- a/man3/tsearch.3 +++ b/man3/tsearch.3 @@ -195,7 +195,7 @@ xmalloc(unsigned n) if (p) return p; fprintf(stderr, "insufficient memory\\n"); - exit(1); + exit(EXIT_FAILURE); } int @@ -241,7 +241,7 @@ main(void) *ptr = rand() & 0xff; val = tsearch((void *) ptr, &root, compare); if (val == NULL) - exit(1); + exit(EXIT_FAILURE); } twalk(root, action); return 0;