Skip to content

Commit c5d3b24

Browse files
committed
ext/json: Remove unnecessary smart_str_alloc() before smart_str_appendc()
1 parent c658d3c commit c5d3b24

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

ext/json/json_encoder.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,6 @@ zend_result php_json_escape_string(
378378
checkpoint = buf->s ? ZSTR_LEN(buf->s) : 0;
379379

380380
/* pre-allocate for string length plus 2 quotes */
381-
smart_str_alloc(buf, len+2, 0);
382381
smart_str_appendc(buf, '"');
383382

384383
pos = 0;

0 commit comments

Comments
 (0)