diff options
author | Sascha Schumann <sas@php.net> | 2001-09-16 16:03:49 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 2001-09-16 16:03:49 +0000 |
commit | 7c161fe06984456ac9d9fe3fb107fe4f630230a0 (patch) | |
tree | 429b9b8140c76a02073a6d6cba7ea3078905fb49 /sapi | |
parent | 993813772565cceaebf51b6fcd1a2ebfcc6b25cc (diff) | |
download | php-git-7c161fe06984456ac9d9fe3fb107fe4f630230a0.tar.gz |
WS-fix and directly use ap_psprintf instead of sprintf/ap_pstrdup
Diffstat (limited to 'sapi')
-rw-r--r-- | sapi/apache/mod_php4.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c index bb4b2a30b4..3a248c0ebb 100644 --- a/sapi/apache/mod_php4.c +++ b/sapi/apache/mod_php4.c @@ -587,18 +587,17 @@ static int send_php(request_rec *r, int display_source_mode, char *filename) */ static int send_parsed_php(request_rec * r) { - int result = send_php(r, 0, NULL); + int result = send_php(r, 0, NULL); #if MEMORY_LIMIT - { - char mem_usage[ 32 ]; - TSRMLS_FETCH(); + { + char *mem_usage; + TSRMLS_FETCH(); - sprintf(mem_usage,"%u", (int) AG(allocated_memory_peak)); - AG(allocated_memory_peak)=0; - ap_table_setn(r->notes, "mod_php_memory_usage", ap_pstrdup(r->pool, mem_usage)); - - } + mem_usage = ap_psprintf(r->pool, "%u", AG(allocated_memory_peak)); + AG(allocated_memory_peak) = 0; + ap_table_setn(r->notes, "mod_php_memory_usage", mem_usage); + } #endif return result; |