https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f68efe516e1c4b21337bf…
commit f68efe516e1c4b21337bf53b80926065a8527414
Author: Doug Lyons <douglyons(a)douglyons.com>
AuthorDate: Sun Feb 9 12:15:50 2020 -0600
Commit: Victor Perevertkin <victor(a)perevertkin.ru>
CommitDate: Tue Dec 28 02:03:54 2021 +0300
Update based on reviewer comments.
---
base/applications/cmdutils/attrib/attrib.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/base/applications/cmdutils/attrib/attrib.c
b/base/applications/cmdutils/attrib/attrib.c
index eb207eb7d80..6eaf053b95a 100644
--- a/base/applications/cmdutils/attrib/attrib.c
+++ b/base/applications/cmdutils/attrib/attrib.c
@@ -129,13 +129,13 @@ PrintAttribute(
if (!(findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
continue;
- if (!wcscmp(findData.cFileName, L".") ||
!wcscmp(findData.cFileName, L".."))
+ if (!wcscmp(findData.cFileName, L".") ||
+ !wcscmp(findData.cFileName, L".."))
continue;
wcscpy(pszFileName, findData.cFileName);
wcscat(pszFileName, L"\\");
- bFound = PrintAttribute(szFullName, pszFile, bRecurse,
- bDirectories) || bFound;
+ bFound != PrintAttribute(szFullName, pszFile, bRecurse, bDirectories);
}
while (FindNextFileW(hFind, &findData));
FindClose(hFind);
@@ -159,7 +159,8 @@ PrintAttribute(
if (bIsDir && !bDirectories && !bExactMatch)
continue;
- if (!wcscmp(findData.cFileName, L".") || !wcscmp(findData.cFileName,
L".."))
+ if (!wcscmp(findData.cFileName, L".") ||
+ !wcscmp(findData.cFileName, L".."))
continue;
wcscpy(pszFileName, findData.cFileName);
@@ -226,13 +227,14 @@ ChangeAttribute(
if (!(findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
continue;
- if (!wcscmp(findData.cFileName, L".") ||
!wcscmp(findData.cFileName, L".."))
+ if (!wcscmp(findData.cFileName, L".") ||
+ !wcscmp(findData.cFileName, L".."))
continue;
wcscpy(pszFileName, findData.cFileName);
wcscat(pszFileName, L"\\");
- bFound = ChangeAttribute(szFullName, pszFile, bRecurse, bDirectories,
- dwMask, dwAttrib) || bFound;
+ bFound != ChangeAttribute(szFullName, pszFile, bRecurse, bDirectories,
+ dwMask, dwAttrib);
}
while (FindNextFileW(hFind, &findData));
FindClose(hFind);
@@ -256,7 +258,8 @@ ChangeAttribute(
if (bIsDir && !bDirectories && !bExactMatch)
continue;
- if (!wcscmp(findData.cFileName, L".") || !wcscmp(findData.cFileName,
L".."))
+ if (!wcscmp(findData.cFileName, L".") ||
+ !wcscmp(findData.cFileName, L".."))
continue;
if (bRecurse && bIsDir && !bDirectories)