summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorSterling Hughes <sterling@php.net>2001-05-16 18:15:49 +0000
committerSterling Hughes <sterling@php.net>2001-05-16 18:15:49 +0000
commit2d84ecbba82e29dfc377442f1623c9d94b25e99f (patch)
treedfd0dfdd4096952d726f36462118fb9a5243b8ba /sapi
parent4565812470bfbb63b1d75017e1927a35eef17279 (diff)
downloadphp-git-2d84ecbba82e29dfc377442f1623c9d94b25e99f.tar.gz
Remove redundancy
# And further fix problem ;)
Diffstat (limited to 'sapi')
-rw-r--r--sapi/apache/mod_php4.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c
index f1f6c827c0..f07ac35418 100644
--- a/sapi/apache/mod_php4.c
+++ b/sapi/apache/mod_php4.c
@@ -295,10 +295,12 @@ static void php_apache_request_shutdown(void *dummy)
static int php_apache_sapi_activate(SLS_D)
{
- request_rec *r = ((request_rec *) SG(server_context));
+ request_rec *r;
SLS_FETCH();
APLS_FETCH();
+ r = (request_rec *) SG(server_context);
+
/*
* For the Apache module version, this bit of code registers a cleanup
* function that gets triggered when our request pool is destroyed.
@@ -308,7 +310,7 @@ static int php_apache_sapi_activate(SLS_D)
* memory.
*/
block_alarms();
- register_cleanup(((request_rec *) SG(server_context))->pool, NULL, php_apache_request_shutdown, php_request_shutdown_for_exec);
+ register_cleanup(r->pool, NULL, php_apache_request_shutdown, php_request_shutdown_for_exec);
AP(in_request)=1;
unblock_alarms();