From: Ilia Alshanetsky Date: Sun, 3 Jul 2005 18:56:57 +0000 (+0000) Subject: Avoid strlen() if we know the length. X-Git-Tag: php-5.1.0b3~204 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dda7692c87fed5131658772cc2c2ad6802d905cc;p=php Avoid strlen() if we know the length. --- diff --git a/ext/date/php_date.c b/ext/date/php_date.c index bb393bd84b..795ec8b8e5 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -531,7 +531,7 @@ PHP_FUNCTION(date_timezone_set) if (DATEG(timezone)) { efree(DATEG(timezone)); } - DATEG(timezone) = estrdup(zone); + DATEG(timezone) = estrndup(zone, zone_len); RETURN_TRUE; }