diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2017-03-12 17:19:20 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2017-03-13 22:07:15 +0100 |
commit | edcabf6d070fd21d7681345fa90976f40c8f564e (patch) | |
tree | 6a91043d25c771a75f99b2289242aea8c643e223 /sapi | |
parent | e8c85a854be7f8bfc1bf0834f817e2df377d0aa3 (diff) | |
download | php-git-edcabf6d070fd21d7681345fa90976f40c8f564e.tar.gz |
Drop unnecessary allocator return value checks
Diffstat (limited to 'sapi')
-rw-r--r-- | sapi/phpdbg/phpdbg_out.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sapi/phpdbg/phpdbg_out.c b/sapi/phpdbg/phpdbg_out.c index 6959077d47..0eead04495 100644 --- a/sapi/phpdbg/phpdbg_out.c +++ b/sapi/phpdbg/phpdbg_out.c @@ -861,11 +861,10 @@ PHPDBG_API int phpdbg_xml_vasprintf(char **buf, const char *format, zend_bool es *buf = NULL; if (cc >= 0) { - if ((*buf = emalloc(++cc)) != NULL) { - if ((cc = phpdbg_xml_vsnprintf(*buf, cc, format, escape_xml, ap)) < 0) { - efree(*buf); - *buf = NULL; - } + *buf = emalloc(++cc); + if ((cc = phpdbg_xml_vsnprintf(*buf, cc, format, escape_xml, ap)) < 0) { + efree(*buf); + *buf = NULL; } } |