summaryrefslogtreecommitdiff
path: root/mysys/my_div.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/my_div.c')
-rw-r--r--mysys/my_div.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mysys/my_div.c b/mysys/my_div.c
index 777ffe403d7..9141ff4fcc5 100644
--- a/mysys/my_div.c
+++ b/mysys/my_div.c
@@ -27,7 +27,7 @@
my_string my_filename(File fd)
{
DBUG_ENTER("my_filename");
- if (fd >= MY_NFILE)
+ if ((uint) fd >= (uint) my_file_limit)
DBUG_RETURN((char*) "UNKNOWN");
if (fd >= 0 && my_file_info[fd].type != UNOPEN)
{