summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2010-12-09 10:14:11 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2010-12-09 10:14:11 +0000
commitef5c356153d3a99edca63188e58fef28f20c6fef (patch)
treef6b068686f135b203d00189dc5e40b73bd576b62 /legacy
parent18dea4b9f862412fbcc88b8b9346fb0c4fba4aa9 (diff)
Use EINA_PATH_MAX where it makes sense.
All the access to Eina_File_Direct_Info::path should be using the actual size (EINA_PATH_MAX) and not another constant (PATH_MAX). SVN revision: 55403
Diffstat (limited to 'legacy')
-rw-r--r--legacy/eina/src/lib/eina_file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/legacy/eina/src/lib/eina_file.c b/legacy/eina/src/lib/eina_file.c
index c62527b427..08a8dd5f41 100644
--- a/legacy/eina/src/lib/eina_file.c
+++ b/legacy/eina/src/lib/eina_file.c
@@ -202,7 +202,7 @@ _eina_file_direct_ls_iterator_next(Eina_File_Direct_Iterator *it, void **data)
202#else 202#else
203 length = strlen(dp->d_name); 203 length = strlen(dp->d_name);
204#endif 204#endif
205 if (it->info.name_start + length + 1 >= PATH_MAX) 205 if (it->info.name_start + length + 1 >= EINA_PATH_MAX)
206 continue; 206 continue;
207 } 207 }
208 while ((dp->d_name[0] == '.') && 208 while ((dp->d_name[0] == '.') &&
@@ -571,7 +571,7 @@ eina_file_direct_ls(const char *dir)
571 if (length < 1) 571 if (length < 1)
572 return NULL; 572 return NULL;
573 573
574 if (length + NAME_MAX + 2 >= PATH_MAX) 574 if (length + NAME_MAX + 2 >= EINA_PATH_MAX)
575 return NULL; 575 return NULL;
576 576
577 it = calloc(1, sizeof(Eina_File_Direct_Iterator) + length); 577 it = calloc(1, sizeof(Eina_File_Direct_Iterator) + length);
@@ -648,7 +648,7 @@ eina_file_stat_ls(const char *dir)
648 if (length < 1) 648 if (length < 1)
649 return NULL; 649 return NULL;
650 650
651 if (length + NAME_MAX + 2 >= PATH_MAX) 651 if (length + NAME_MAX + 2 >= EINA_PATH_MAX)
652 return NULL; 652 return NULL;
653 653
654 it = calloc(1, sizeof(Eina_File_Direct_Iterator) + length); 654 it = calloc(1, sizeof(Eina_File_Direct_Iterator) + length);