summaryrefslogtreecommitdiff
path: root/file_io/unix/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'file_io/unix/dir.c')
-rw-r--r--file_io/unix/dir.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/file_io/unix/dir.c b/file_io/unix/dir.c
index 5a17b8601..d9b344f30 100644
--- a/file_io/unix/dir.c
+++ b/file_io/unix/dir.c
@@ -142,12 +142,6 @@ static apr_filetype_e filetype_from_dirent_type(int type)
apr_status_t apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted,
apr_dir_t *thedir)
{
- return apr_dir_pread(finfo, wanted, thedir, thedir->pool);
-}
-
-apr_status_t apr_dir_pread(apr_finfo_t *finfo, apr_int32_t wanted,
- apr_dir_t *thedir, apr_pool_t *pool)
-{
apr_status_t ret = 0;
#ifdef DIRENT_TYPE
apr_filetype_e type;
@@ -257,7 +251,7 @@ apr_status_t apr_dir_pread(apr_finfo_t *finfo, apr_int32_t wanted,
apr_cpystrn(end, thedir->entry->d_name,
sizeof fspec - (end - fspec));
- ret = apr_stat(finfo, fspec, APR_FINFO_LINK | wanted, pool);
+ ret = apr_stat(finfo, fspec, APR_FINFO_LINK | wanted, thedir->pool);
/* We passed a stack name that will disappear */
finfo->fname = NULL;
}
@@ -269,7 +263,7 @@ apr_status_t apr_dir_pread(apr_finfo_t *finfo, apr_int32_t wanted,
/* We don't bail because we fail to stat, when we are only -required-
* to readdir... but the result will be APR_INCOMPLETE
*/
- finfo->pool = pool;
+ finfo->pool = thedir->pool;
finfo->valid = 0;
#ifdef DIRENT_TYPE
if (type != APR_UNKFILE) {
@@ -285,7 +279,7 @@ apr_status_t apr_dir_pread(apr_finfo_t *finfo, apr_int32_t wanted,
#endif
}
- finfo->name = apr_pstrdup(pool, thedir->entry->d_name);
+ finfo->name = apr_pstrdup(thedir->pool, thedir->entry->d_name);
finfo->valid |= APR_FINFO_NAME;
if (wanted)