From a0fae8dcae9e10cc7b751ed216017ded29177be1 Mon Sep 17 00:00:00 2001 From: Arpit Agarwal Date: Fri, 8 May 2015 11:42:50 -0700 Subject: [PATCH] =?UTF-8?q?HADOOP-10356.=20Corrections=20in=20winutils/chm?= =?UTF-8?q?od.c=20(Contributed=20by=20Ren=C3=A9=20Nyffenegger)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../hadoop-common/src/main/winutils/chmod.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 432c6b6e124..ff7531aa031 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -632,6 +632,9 @@ Release 2.8.0 - UNRELEASED HADOOP-11877. SnappyDecompressor's Logger class name is wrong (surendra singh lilhore via vinayakumarb) + HADOOP-10356. Corrections in winutils/chmod.c. (Rene Nyffenegger via + Arpit Agarwal) + Release 2.7.1 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/main/winutils/chmod.c b/hadoop-common-project/hadoop-common/src/main/winutils/chmod.c index c48f7347f6d..ff7bff33e77 100644 --- a/hadoop-common-project/hadoop-common/src/main/winutils/chmod.c +++ b/hadoop-common-project/hadoop-common/src/main/winutils/chmod.c @@ -105,7 +105,7 @@ static BOOL ChangeFileModeRecursively(__in LPCWSTR path, __in_opt INT mode, // int Chmod(__in int argc, __in_ecount(argc) wchar_t *argv[]) { - LPWSTR pathName = NULL; + LPCWSTR pathName = NULL; LPWSTR longPathName = NULL; BOOL recursive = FALSE; @@ -128,7 +128,7 @@ int Chmod(__in int argc, __in_ecount(argc) wchar_t *argv[]) return EXIT_FAILURE; } - // Convert the path the the long path + // Convert the path to the long path // dwRtnCode = ConvertToLongPath(pathName, &longPathName); if (dwRtnCode != ERROR_SUCCESS) @@ -763,7 +763,7 @@ static BOOL ParseMode(LPCWSTR modeString, PMODE_CHANGE_ACTION *pActions) { switch (c) { - case NULL: + case L'\0': __fallthrough; case L',': i++;