diff options
author | Nikita Popov <nikic@php.net> | 2015-07-17 16:49:34 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2015-07-17 16:53:07 +0200 |
commit | 20e5027293bf8711bc4f6cabd8f304ca5b127690 (patch) | |
tree | 5fba6e5f890a6fb50c398b95237f2bea570978d4 /sapi/phpdbg/phpdbg_print.c | |
parent | 75dc4486b2b95989f62717da4feca8ebe4bbb528 (diff) | |
download | php-git-20e5027293bf8711bc4f6cabd8f304ca5b127690.tar.gz |
Switch asprintf to spprintf in phpdbg opcode dump
Also use %td where appropriate, a lot of the values are ptrdiff
based.
Fix a leak in phpdbg_frame.c.
Diffstat (limited to 'sapi/phpdbg/phpdbg_print.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_print.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/sapi/phpdbg/phpdbg_print.c b/sapi/phpdbg/phpdbg_print.c index b7bb9e688a..4a00189b46 100644 --- a/sapi/phpdbg/phpdbg_print.c +++ b/sapi/phpdbg/phpdbg_print.c @@ -82,15 +82,11 @@ static inline void phpdbg_print_function_helper(zend_function *method) /* {{{ */ do { char *decode = phpdbg_decode_opline(op_array, opline); - if (decode != NULL) { - phpdbg_writeln("print", "line=\"%u\" opnum=\"%u\" op=\"%s\"", " L%-4u #%-5u %s", - opline->lineno, - opcode, - decode); - free(decode); - } else { - phpdbg_error("print", "type=\"decodefailure\" opline=\"%16p\"", "Failed to decode opline %16p", opline); - } + phpdbg_writeln("print", "line=\"%u\" opnum=\"%u\" op=\"%s\"", " L%-4u #%-5u %s", + opline->lineno, + opcode, + decode); + efree(decode); opline++; } while (opcode++ < end); } |