diff options
Diffstat (limited to 'sapi/phpdbg/phpdbg_out.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_out.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sapi/phpdbg/phpdbg_out.c b/sapi/phpdbg/phpdbg_out.c index 6959077d47..1305bf6d5e 100644 --- a/sapi/phpdbg/phpdbg_out.c +++ b/sapi/phpdbg/phpdbg_out.c @@ -589,7 +589,7 @@ static int format_converter(register buffy *odp, const char *fmt, zend_bool esca case 'r': if (PHPDBG_G(req_id)) { - s_len = spprintf(&s, 0, "req=\"%lu\"", PHPDBG_G(req_id)); + s_len = spprintf(&s, 0, "req=\"" ZEND_ULONG_FMT "\"", PHPDBG_G(req_id)); free_s = s; } else { s = ""; @@ -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; } } @@ -1063,7 +1062,7 @@ static int phpdbg_process_print(int fd, int type, const char *tag, const char *m if (PHPDBG_G(req_id)) { char *xmlbuf = NULL; - xmllen = phpdbg_asprintf(&xmlbuf, "req=\"%lu\" %.*s", PHPDBG_G(req_id), xmllen, xml); + xmllen = phpdbg_asprintf(&xmlbuf, "req=\"" ZEND_ULONG_FMT "\" %.*s", PHPDBG_G(req_id), xmllen, xml); xml = xmlbuf; } if (msgout) { |