From: Thomas Punt Date: Thu, 24 Mar 2016 11:09:59 +0000 (+0000) Subject: Use STR_EMPTY_ALLOC macro instead X-Git-Tag: php-5.6.21RC1~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1aea777349f8b86495d23ed7c8c71632c7555e55;p=php Use STR_EMPTY_ALLOC macro instead --- diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 4bb088881e..750800da4c 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -4309,7 +4309,7 @@ static char *date_interval_format(char *format, int format_len, timelib_rel_time char buffer[33]; if (!format_len) { - return estrdup(""); + return STR_EMPTY_ALLOC(); } for (i = 0; i < format_len; i++) { @@ -4360,7 +4360,7 @@ static char *date_interval_format(char *format, int format_len, timelib_rel_time smart_str_0(&string); if (string.c == NULL) { - return estrdup(""); + return STR_EMPTY_ALLOC(); } return string.c;