am 29e55ef8: am edf4e179: Merge "Fix vold\'s use of readdir_r(3)."

* commit '29e55ef83def8eaf6aa01201c6344a8037b2f780':
  Fix vold's use of readdir_r(3).
This commit is contained in:
Elliott Hughes 2012-10-30 10:11:34 -07:00 committed by Android Git Automerger
commit bb7afa4989
2 changed files with 2 additions and 2 deletions

View file

@ -270,7 +270,7 @@ void CommandListener::AsecCmd::listAsecsInDirectory(SocketClient *cli, const cha
}
size_t dirent_len = offsetof(struct dirent, d_name) +
pathconf(directory, _PC_NAME_MAX) + 1;
fpathconf(dirfd(d), _PC_NAME_MAX) + 1;
struct dirent *dent = (struct dirent *) malloc(dirent_len);
if (dent == NULL) {

View file

@ -1471,7 +1471,7 @@ int VolumeManager::unmountAllAsecsInDir(const char *directory) {
}
size_t dirent_len = offsetof(struct dirent, d_name) +
pathconf(directory, _PC_NAME_MAX) + 1;
fpathconf(dirfd(d), _PC_NAME_MAX) + 1;
struct dirent *dent = (struct dirent *) malloc(dirent_len);
if (dent == NULL) {