com php-src: Use STR_EMPTY_ALLOC macro instead: ext /date/php_date.c

From: Date: Tue, 05 Apr 2016 09:18:14 +0000
Subject: com php-src: Use STR_EMPTY_ALLOC macro instead: ext /date/php_date.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-91603@lists.php.net to get a copy of this message
Commit: 1aea777349f8b86495d23ed7c8c71632c7555e55 Author: Thomas Punt <tpunt@hotmail.co.uk> Thu, 24 Mar 2016 11:09:59 +0000 Committer: Anatol Belski <ab@php.net> Tue, 5 Apr 2016 11:18:14 +0200 Parents: 40f14bad33f428994b4a590dafa8fe4d058f7241 Branches: PHP-5.6 PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1aea777349f8b86495d23ed7c8c71632c7555e55 Log: Use STR_EMPTY_ALLOC macro instead Changed paths: M ext/date/php_date.c Diff: diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 4bb0888..750800d 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;

« previous php.cvs (#91603) next »