cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9c992c05d5494764df209faf1a36c04972814628

commit 9c992c05d5494764df209faf1a36c04972814628
Author: Cedric BAIL <cedric.b...@free.fr>
Date:   Fri May 10 14:28:49 2019 -0700

    eina: refactor and simplify vpath.
    
    Reviewed-by: Marcel Hollerbach <m...@marcel-hollerbach.de>
    Differential Revision: https://phab.enlightenment.org/D8882
---
 src/lib/eina/eina_vpath.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/src/lib/eina/eina_vpath.c b/src/lib/eina/eina_vpath.c
index aa7b46bddb..87b85662d9 100644
--- a/src/lib/eina/eina_vpath.c
+++ b/src/lib/eina/eina_vpath.c
@@ -258,18 +258,10 @@ _eina_vpath_resolve(const char *path, char *str, size_t 
size)
      {
         const char *p, *end, *meta;
         char *name;
-        int max_len = strlen(path);
         Eina_Bool found = EINA_FALSE;
 
-        for (p = path + 2; p <= path + max_len - 2; p++)
-          {
-             if ((p[0] ==':') && (p[1] == ')'))
-               {
-                  end = p;
-                  found = EINA_TRUE;
-                  break;
-               }
-          }
+        end = p = strstr(path + 2, ":)");
+        if (p) found = EINA_TRUE;
         p += 2;
 
         if (!found)

-- 


Reply via email to