-Fix some typo

-Remove one unnecessary memory allocation

Change-Id: Icea21f33d2c7891333e06429d2f382389e5bd27f
This commit is contained in:
Gloria Wang
2011-06-15 10:27:52 -07:00
parent 6771263604
commit c10ce33302
2 changed files with 15 additions and 17 deletions

View File

@@ -202,7 +202,7 @@ private:
Vector<String8> getPlugInPathList(const String8& rsDirPath) {
Vector<String8> fileList;
DIR* pDir = opendir(rsDirPath.string());
struct dirent* pEntry = new dirent();
struct dirent* pEntry;
while (NULL != pDir && NULL != (pEntry = readdir(pDir))) {
if (!isPlugIn(pEntry)) {
@@ -219,8 +219,6 @@ private:
if (NULL != pDir) {
closedir(pDir);
}
delete pEntry;
pEntry = NULL;
return fileList;
}