Use EINA_PATH_MAX where it makes sense.
authorbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 9 Dec 2010 10:14:11 +0000 (10:14 +0000)
committerbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 9 Dec 2010 10:14:11 +0000 (10:14 +0000)
All the access to Eina_File_Direct_Info::path should be using the
actual size (EINA_PATH_MAX) and not another constant (PATH_MAX).

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eina@55403 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/eina_file.c

index c62527b..08a8dd5 100644 (file)
@@ -202,7 +202,7 @@ _eina_file_direct_ls_iterator_next(Eina_File_Direct_Iterator *it, void **data)
 #else
         length = strlen(dp->d_name);
 #endif
-        if (it->info.name_start + length + 1 >= PATH_MAX)
+        if (it->info.name_start + length + 1 >= EINA_PATH_MAX)
            continue;
      }
    while ((dp->d_name[0] == '.') &&
@@ -571,7 +571,7 @@ eina_file_direct_ls(const char *dir)
    if (length < 1)
       return NULL;
 
-   if (length + NAME_MAX + 2 >= PATH_MAX)
+   if (length + NAME_MAX + 2 >= EINA_PATH_MAX)
       return NULL;
 
    it = calloc(1, sizeof(Eina_File_Direct_Iterator) + length);
@@ -648,7 +648,7 @@ eina_file_stat_ls(const char *dir)
    if (length < 1)
       return NULL;
 
-   if (length + NAME_MAX + 2 >= PATH_MAX)
+   if (length + NAME_MAX + 2 >= EINA_PATH_MAX)
       return NULL;
 
    it = calloc(1, sizeof(Eina_File_Direct_Iterator) + length);