@@ -259,8 +259,8 @@ static php_stream_filter *user_filter_factory_create(const char *filtername,
259259 len = strlen (filtername );
260260
261261 /* determine the classname/class entry */
262- if (NULL == (fdat = zend_hash_str_find_ptr (BG (user_filter_map ), ( char * ) filtername , len ))) {
263- char * period ;
262+ if (NULL == (fdat = zend_hash_str_find_ptr (BG (user_filter_map ), filtername , len ))) {
263+ const char * period ;
264264
265265 /* Userspace Filters using ambiguous wildcards could cause problems.
266266 i.e.: myfilter.foo.bar will always call into myfilter.foo.*
@@ -272,16 +272,16 @@ static php_stream_filter *user_filter_factory_create(const char *filtername,
272272
273273 /* Search for wildcard matches instead */
274274 memcpy (wildcard , filtername , len + 1 ); /* copy \0 */
275- period = wildcard + (period - filtername );
276- while (period ) {
277- ZEND_ASSERT (period [0 ] == '.' );
278- period [1 ] = '*' ;
279- period [2 ] = '\0' ;
275+ char * new_period = wildcard + (period - filtername );
276+ while (new_period ) {
277+ ZEND_ASSERT (new_period [0 ] == '.' );
278+ new_period [1 ] = '*' ;
279+ new_period [2 ] = '\0' ;
280280 if (NULL != (fdat = zend_hash_str_find_ptr (BG (user_filter_map ), wildcard , strlen (wildcard )))) {
281- period = NULL ;
281+ new_period = NULL ;
282282 } else {
283- * period = '\0' ;
284- period = strrchr (wildcard , '.' );
283+ * new_period = '\0' ;
284+ new_period = strrchr (wildcard , '.' );
285285 }
286286 }
287287 efree (wildcard );
@@ -311,7 +311,7 @@ static php_stream_filter *user_filter_factory_create(const char *filtername,
311311 }
312312
313313 /* filtername */
314- add_property_string (& obj , "filtername" , ( char * ) filtername );
314+ add_property_string (& obj , "filtername" , filtername );
315315
316316 /* and the parameters, if any */
317317 if (filterparams ) {
0 commit comments