summaryrefslogtreecommitdiff
path: root/ext/zlib/zlib.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-03-20 02:02:42 +0300
committerDmitry Stogov <dmitry@zend.com>2015-03-20 02:02:42 +0300
commitd146d15003442a2e5234dd2fab1605094dc21630 (patch)
tree3a20cd8866a8544ed8bfd04b8c71f7041b4ca91e /ext/zlib/zlib.c
parent184793b5c1e7a9df67e542893b69bace5cd7a67c (diff)
downloadphp-git-d146d15003442a2e5234dd2fab1605094dc21630.tar.gz
Optimize zend_string_realloc() add more specialized versions zend_string_extend() and zend_string_truncate()
Diffstat (limited to 'ext/zlib/zlib.c')
-rw-r--r--ext/zlib/zlib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 64eac450cd..b638ab4377 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -336,7 +336,7 @@ static zend_string *php_zlib_encode(const char *in_buf, size_t in_len, int encod
if (Z_STREAM_END == status) {
/* size buffer down to actual length */
- out = zend_string_realloc(out, Z.total_out, 0);
+ out = zend_string_truncate(out, Z.total_out, 0);
out->val[out->len] = '\0';
return out;
} else {