From b9677d313d4c3e41282ad7e270a11a8891822437 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Sat, 20 Sep 2014 20:05:27 +0200 Subject: [PATCH] avoid strlen usage in loop --- ext/date/php_date.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/date/php_date.c b/ext/date/php_date.c index a93afab59b..3fd4b27eb3 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -4496,12 +4496,12 @@ PHP_FUNCTION(timezone_abbreviations_list) do { array_init(&element); - add_assoc_bool(&element, "dst", entry->type); - add_assoc_long(&element, "offset", entry->gmtoffset); + add_assoc_bool_ex(&element, "dst", sizeof("dst") -1, entry->type); + add_assoc_long_ex(&element, "offset", sizeof("offset") - 1, entry->gmtoffset); if (entry->full_tz_name) { - add_assoc_string(&element, "timezone_id", entry->full_tz_name); + add_assoc_string_ex(&element, "timezone_id", sizeof("timezone_id") - 1, entry->full_tz_name); } else { - add_assoc_null(&element, "timezone_id"); + add_assoc_null_ex(&element, "timezone_id", sizeof("timezone_id") - 1); } abbr_array_p = zend_hash_str_find(HASH_OF(return_value), entry->name, strlen(entry->name)); -- 2.50.1