summaryrefslogtreecommitdiff
path: root/mysys/my_access.c
diff options
context:
space:
mode:
authormonty@mysql.com <>2005-07-03 14:17:52 +0300
committermonty@mysql.com <>2005-07-03 14:17:52 +0300
commit86d7b02199faddf91f9c7d7a6d62dda101be36ed (patch)
treebf06496ea5d097316e5972a5cf4c4d5f674fb90b /mysys/my_access.c
parent2941da3971a13318836ca85e204e49e3bb034253 (diff)
parent62173c5a9d8fcd1f9b365f3cbf14198d06b2170e (diff)
downloadmariadb-git-86d7b02199faddf91f9c7d7a6d62dda101be36ed.tar.gz
Merge with 4.1
Diffstat (limited to 'mysys/my_access.c')
-rw-r--r--mysys/my_access.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/mysys/my_access.c b/mysys/my_access.c
index c01031827c0..256749ed447 100644
--- a/mysys/my_access.c
+++ b/mysys/my_access.c
@@ -98,17 +98,16 @@ int check_if_legal_filename(const char *path)
for (reserved_name= reserved_names; *reserved_name; reserved_name++)
{
+ const char *reserved= *reserved_name; /* never empty */
const char *name= path;
- const char *current_reserved_name= *reserved_name;
- while (name != end && *current_reserved_name)
+ do
{
- if (*current_reserved_name != my_toupper(&my_charset_latin1, *name))
+ if (*reserved != my_toupper(&my_charset_latin1, *name))
break;
- current_reserved_name++;
if (++name == end)
DBUG_RETURN(1); /* Found wrong path */
- }
+ } while (*++reserved);
}
DBUG_RETURN(0);
}