discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=41f98b96bb368551642141a6f9cf0f82ddecf7d5

commit 41f98b96bb368551642141a6f9cf0f82ddecf7d5
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Tue Mar 22 12:01:04 2016 -0400

    use eina_streq for e_util_binding_match() comparisons
    
    optimizes what is likely a stringshare comparison as well as avoiding
    null derefs
    
    CID 1191998
---
 src/bin/e_utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/e_utils.c b/src/bin/e_utils.c
index add4d1f..63c337e 100644
--- a/src/bin/e_utils.c
+++ b/src/bin/e_utils.c
@@ -1176,7 +1176,7 @@ e_util_binding_match(const Eina_List *bindlist, 
Ecore_Event_Key *ev, unsigned in
      {
         if (bi != skip)
           {
-             if ((bi->modifiers == mod) && (!strcmp(bi->key, ev->key)))
+             if ((bi->modifiers == mod) && eina_streq(bi->key, ev->key))
                return bi;
           }
         if (num) (*num)++;

-- 


Reply via email to