aboutsummaryrefslogtreecommitdiffstats
path: root/man3
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2007-05-14 21:11:42 +0000
committerMichael Kerrisk <mtk.manpages@gmail.com>2007-05-14 21:11:42 +0000
commit4c44ffe5dca2a7572d2677bd7174e28d570d4a3e (patch)
treebecb4ce535227686fc4170f06e266c85d74bd200 /man3
parent19dbfd0a9829c3d3142e38ca51f06dad606ef65d (diff)
downloadman-pages-4c44ffe5dca2a7572d2677bd7174e28d570d4a3e.tar.gz
Use symbolic constants in exit(2) calls
Diffstat (limited to 'man3')
-rw-r--r--man3/dlopen.34
-rw-r--r--man3/getgrent_r.32
-rw-r--r--man3/getopt.32
-rw-r--r--man3/getpwent_r.32
-rw-r--r--man3/hsearch.32
-rw-r--r--man3/tsearch.34
6 files changed, 8 insertions, 8 deletions
diff --git a/man3/dlopen.3 b/man3/dlopen.3
index 5c6ff8c2f9..c9ba55285c 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 043f8974bb..9b86c24b73 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 93f6ef1e3b..1049f5f175 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 df8a528a49..91e9f30fa6 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 00089d8779..01c7357bd5 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 b7b3cccd4d..e2ae9d23ca 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;