From e5db3054a15904627beeb8a3cd3fe2c949f7eb6c Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Fri, 16 Feb 2018 12:45:05 +0100 Subject: [PATCH] Fix duplicated strlen call --- ext/intl/locale/locale_methods.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c index 57b5ec5dd1..d12df97a38 100644 --- a/ext/intl/locale/locale_methods.c +++ b/ext/intl/locale/locale_methods.c @@ -1000,10 +1000,9 @@ static zend_string* get_private_subtags(const char* loc_name) size_t len = 0; const char* mod_loc_name =NULL; - if( loc_name && (len = strlen(loc_name)>0 ) ){ + if( loc_name && (len = strlen(loc_name)) > 0 ){ zend_off_t singletonPos = 0; mod_loc_name = loc_name ; - len = strlen(mod_loc_name); while( (singletonPos = getSingletonPos(mod_loc_name)) > -1){ if( (*(mod_loc_name+singletonPos)=='x') || (*(mod_loc_name+singletonPos)=='X') ){ /* private subtag start found */ -- 2.40.0