From 052d0057c2d96f013dbc3a477a46a10672db9094 Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Mon, 17 Feb 2014 16:24:04 +1300 Subject: Only call strlen(lc_fname) if we are going to use the result --- Lib/php/director.swg | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Lib/php') diff --git a/Lib/php/director.swg b/Lib/php/director.swg index 50b433e47..6671f5580 100644 --- a/Lib/php/director.swg +++ b/Lib/php/director.swg @@ -102,12 +102,11 @@ namespace Swig { TSRMLS_FETCH_FROM_CTX(swig_zts_ctx); zend_class_entry **ce; zend_function *mptr; - int name_len = strlen(lc_fname); if (zend_lookup_class(cname, strlen(cname), &ce TSRMLS_CC) != SUCCESS) { return false; } - if (zend_hash_find(&(*ce)->function_table, lc_fname, name_len + 1, (void **) &mptr) != SUCCESS) { + if (zend_hash_find(&(*ce)->function_table, lc_fname, strlen(lc_fname) + 1, (void **) &mptr) != SUCCESS) { return false; } // common.scope points to the declaring class -- cgit v1.2.1