< prev index next >
src/hotspot/share/jfr/recorder/repository/jfrRepository.cpp
Print this page
rev 50955 : [mq]: readdir
*** 239,253 ****
if (dirp == NULL) {
log_error(jfr, system)("Unable to open repository %s", _repo);
return;
}
struct dirent* dentry;
! char* dir_buffer = NEW_RESOURCE_ARRAY_RETURN_NULL(char, os::readdir_buf_size(_repo));
! if (dir_buffer == NULL) {
! return;
! }
! while ((dentry = os::readdir(dirp, (struct dirent*)dir_buffer)) != NULL) {
const char* const entry_path = filter(dentry->d_name);
if (NULL != entry_path) {
_files->append(entry_path);
}
}
--- 239,249 ----
if (dirp == NULL) {
log_error(jfr, system)("Unable to open repository %s", _repo);
return;
}
struct dirent* dentry;
! while ((dentry = os::readdir(dirp)) != NULL) {
const char* const entry_path = filter(dentry->d_name);
if (NULL != entry_path) {
_files->append(entry_path);
}
}
< prev index next >