diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2007-05-19 17:52:30 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2007-05-19 17:52:30 +0000 |
commit | c8a694eb4574e4e7d71d5836b8dc87ee95b6c08b (patch) | |
tree | e651ee4083ed8dc72a387fb3daf6535b29abc09f | |
parent | 2a6442190cbe8d79e1c8daf4dac7da387b971019 (diff) | |
download | php-git-c8a694eb4574e4e7d71d5836b8dc87ee95b6c08b.tar.gz |
Avoid strlen()
-rw-r--r-- | ext/iconv/iconv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 398952a2c5..3c2f447416 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -2305,8 +2305,8 @@ PHP_FUNCTION(ob_iconv_handler) ICONVG(output_encoding), ICONVG(internal_encoding)); _php_iconv_show_error(err, ICONVG(output_encoding), ICONVG(internal_encoding) TSRMLS_CC); if (out_buffer != NULL) { - spprintf(&content_type, 0, "Content-Type:%s; charset=%s", mimetype, ICONVG(output_encoding)); - if (content_type && sapi_add_header(content_type, strlen(content_type), 0) != FAILURE) { + int len = spprintf(&content_type, 0, "Content-Type:%s; charset=%s", mimetype, ICONVG(output_encoding)); + if (content_type && sapi_add_header(content_type, len, 0) != FAILURE) { SG(sapi_headers).send_default_content_type = 0; } if (mimetype_alloced) { |