Nikolay Sivov : shlwapi: Always close find handle (Coverity).
Alexandre Julliard
julliard at winehq.org
Thu Apr 10 12:21:28 CDT 2014
Module: wine
Branch: master
Commit: 14dab8ab4b998b7f104d7529e40a9d1bc906cb8e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=14dab8ab4b998b7f104d7529e40a9d1bc906cb8e
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Thu Apr 10 09:23:00 2014 +0400
shlwapi: Always close find handle (Coverity).
---
dlls/shlwapi/path.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/dlls/shlwapi/path.c b/dlls/shlwapi/path.c
index 5f70bcc..eba1f69 100644
--- a/dlls/shlwapi/path.c
+++ b/dlls/shlwapi/path.c
@@ -3885,16 +3885,14 @@ BOOL WINAPI PathIsDirectoryEmptyW(LPCWSTR lpszPath)
strcpyW(szSearch + dwLen, szAllFiles);
hfind = FindFirstFileW(szSearch, &find_data);
-
- if (hfind != INVALID_HANDLE_VALUE &&
- find_data.cFileName[0] == '.' &&
- find_data.cFileName[1] == '.')
+ if (hfind != INVALID_HANDLE_VALUE)
{
- /* The only directory entry should be the parent */
- if (!FindNextFileW(hfind, &find_data))
- retVal = TRUE;
+ if (find_data.cFileName[0] == '.' && find_data.cFileName[1] == '.')
+ /* The only directory entry should be the parent */
+ retVal = !FindNextFileW(hfind, &find_data);
FindClose(hfind);
}
+
return retVal;
}
More information about the wine-cvs
mailing list