From: Aaron Bannert Date: Fri, 12 Apr 2002 22:26:28 +0000 (+0000) Subject: Fix a typo and a build error detected by the lovely HPUX11 ANSI C compiler. X-Git-Tag: php-4.2.0RC4~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e0fb69cfc4e4556aa5e735b0e0057d06620a46aa;p=php Fix a typo and a build error detected by the lovely HPUX11 ANSI C compiler. --- diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c index 986de019f2..24724bb9b7 100644 --- a/sapi/apache2filter/sapi_apache2.c +++ b/sapi/apache2filter/sapi_apache2.c @@ -257,7 +257,7 @@ static int php_input_filter(ap_filter_t *f, apr_bucket_brigade *bb, long old_index; apr_bucket *b; const char *str; - apr_ssize_t n; + apr_size_t n; apr_status_t rv; TSRMLS_FETCH(); @@ -322,10 +322,12 @@ static void php_apache_request_dtor(ap_filter_t *f TSRMLS_DC) { php_request_shutdown(NULL); -#undef safe_free -#define safe_free(x) ((x)?free((x)):0) - safe_free(SG(request_info).query_string); - safe_free(SG(request_info).request_uri); + if (SG(request_info).query_string) { + free(SG(request_info).query_string); + } + if (SG(request_info).query_string) { + free(SG(request_info).request_uri); + } } static int php_output_filter(ap_filter_t *f, apr_bucket_brigade *bb)