summaryrefslogtreecommitdiff
path: root/ext/date/php_date.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-09-20 20:05:27 +0200
committerAnatol Belski <ab@php.net>2014-09-20 20:05:27 +0200
commitb9677d313d4c3e41282ad7e270a11a8891822437 (patch)
tree3291baa17710fdfa74b4cbc1f94bbb4012ae8fb4 /ext/date/php_date.c
parent132cd8be0d13eaeee200cfa09b0596f6619c6a7e (diff)
downloadphp-git-b9677d313d4c3e41282ad7e270a11a8891822437.tar.gz
avoid strlen usage in loop
Diffstat (limited to 'ext/date/php_date.c')
-rw-r--r--ext/date/php_date.c8
1 files 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));