zmike pushed a commit to branch efl-1.22.

http://git.enlightenment.org/core/efl.git/commit/?id=3276462202bd83aff74925585dd47ec3558c0475

commit 3276462202bd83aff74925585dd47ec3558c0475
Author: Cedric BAIL <[email protected]>
Date:   Fri May 10 14:28:49 2019 -0700

    eina: refactor and simplify vpath.
    
    Reviewed-by: Marcel Hollerbach <[email protected]>
    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 a0c6a2acae..1e19ffca49 100644
--- a/src/lib/eina/eina_vpath.c
+++ b/src/lib/eina/eina_vpath.c
@@ -257,18 +257,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