diff options
author | Greg Stein <gstein@apache.org> | 2000-07-08 11:31:49 +0000 |
---|---|---|
committer | Greg Stein <gstein@apache.org> | 2000-07-08 11:31:49 +0000 |
commit | 2fd470398905d8608c66171abbf87217a8ed26d7 (patch) | |
tree | 403986b3f158c7a4a22578129cc3ab8cccb2c609 /threadproc/unix/threadpriv.c | |
parent | 60a6a5e0a3dbaae290764674f4cc604237dacee4 (diff) | |
download | apr-2fd470398905d8608c66171abbf87217a8ed26d7.tar.gz |
a while back, we said "segfault on invalid params rather than returning an
error." this removes some of the error checking that was occurring in the
"user data" functions. also saw some in the "get/set OS type" functions and
nuked those; there are still checks for pool==NULL, though, since that would
end up making us malloc() rather than segfault'ing.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60318 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc/unix/threadpriv.c')
-rw-r--r-- | threadproc/unix/threadpriv.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/threadproc/unix/threadpriv.c b/threadproc/unix/threadpriv.c index 2100fad23..5b8f3aaa9 100644 --- a/threadproc/unix/threadpriv.c +++ b/threadproc/unix/threadpriv.c @@ -111,33 +111,19 @@ ap_status_t ap_delete_thread_private(ap_threadkey_t *key) ap_status_t ap_get_threadkeydata(void **data, const char *key, ap_threadkey_t *threadkey) { - if (threadkey != NULL) { - return ap_get_userdata(data, key, threadkey->cntxt); - } - else { - data = NULL; - return APR_ENOTHDKEY; - } + return ap_get_userdata(data, key, threadkey->cntxt); } ap_status_t ap_set_threadkeydata(void *data, const char *key, ap_status_t (*cleanup) (void *), ap_threadkey_t *threadkey) { - if (threadkey != NULL) { - return ap_set_userdata(data, key, cleanup, threadkey->cntxt); - } - else { - data = NULL; - return APR_ENOTHDKEY; - } + return ap_set_userdata(data, key, cleanup, threadkey->cntxt); } ap_status_t ap_get_os_threadkey(ap_os_threadkey_t *thekey, ap_threadkey_t *key) { - if (key == NULL) { - return APR_ENOFILE; - } + /* ### broken. is the signature broken? */ thekey = &(key->key); return APR_SUCCESS; } @@ -155,5 +141,5 @@ ap_status_t ap_put_os_threadkey(ap_threadkey_t **key, (*key)->key = *thekey; return APR_SUCCESS; } -#endif -#endif +#endif /* APR_HAVE_PTHREAD_H */ +#endif /* APR_HAS_THREADS */ |