mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Avoid strlen() if we know the length.
This commit is contained in:
parent
34c4ac7bac
commit
dda7692c87
1 changed files with 1 additions and 1 deletions
|
@ -531,7 +531,7 @@ PHP_FUNCTION(date_timezone_set)
|
||||||
if (DATEG(timezone)) {
|
if (DATEG(timezone)) {
|
||||||
efree(DATEG(timezone));
|
efree(DATEG(timezone));
|
||||||
}
|
}
|
||||||
DATEG(timezone) = estrdup(zone);
|
DATEG(timezone) = estrndup(zone, zone_len);
|
||||||
RETURN_TRUE;
|
RETURN_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue