From 0d0aed259389c00b5f4da7c486d0d6f1e1168f95 Mon Sep 17 00:00:00 2001 From: englebass Date: Thu, 4 Feb 2010 20:02:45 +0000 Subject: [PATCH] Don't do unnecessary strcmp git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eet@45882 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/eet_lib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/eet_lib.c b/src/lib/eet_lib.c index a23acd5..c9f8574 100644 --- a/src/lib/eet_lib.c +++ b/src/lib/eet_lib.c @@ -2100,6 +2100,8 @@ eet_list(Eet_File *ef, const char *glob, int *count_ret) return NULL; } + if (!strcmp(glob, "*")) glob = NULL; + LOCK_FILE(ef); /* loop through all entries */ @@ -2112,7 +2114,7 @@ eet_list(Eet_File *ef, const char *glob, int *count_ret) * check for * explicitly, because on some systems, * isn't well * supported */ - if ((!strcmp (glob, "*")) || !fnmatch(glob, efn->name, 0)) + if ((!glob) || !fnmatch(glob, efn->name, 0)) { /* add it to our list */ list_count++; -- 2.7.4