diff options
author | Brad King <brad.king@kitware.com> | 2018-09-17 13:22:22 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-09-17 13:22:38 (GMT) |
commit | b3f1e654860f6e1481fc0e07f6fb7dfab585472f (patch) | |
tree | 34fa9288d4191e9f49c05eb98a46e1de303bb947 | |
parent | 19daeda516f6c9008475511a578909ae578a8b41 (diff) | |
parent | 49e7a82c90bd1ccd59089b6c0b1687c341e51d5e (diff) | |
download | CMake-b3f1e654860f6e1481fc0e07f6fb7dfab585472f.zip CMake-b3f1e654860f6e1481fc0e07f6fb7dfab585472f.tar.gz CMake-b3f1e654860f6e1481fc0e07f6fb7dfab585472f.tar.bz2 |
Merge topic 'update-kwsys'
49e7a82c90 Merge branch 'upstream-KWSys' into update-kwsys
b13c8526b1 KWSys 2018-09-14 (1809bedd)
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2385
-rw-r--r-- | Source/kwsys/ProcessWin32.c | 4 | ||||
-rw-r--r-- | Source/kwsys/SystemTools.cxx | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Source/kwsys/ProcessWin32.c b/Source/kwsys/ProcessWin32.c index 9fa0cb1..2a2e737 100644 --- a/Source/kwsys/ProcessWin32.c +++ b/Source/kwsys/ProcessWin32.c @@ -973,8 +973,8 @@ void kwsysProcess_Execute(kwsysProcess* cp) wchar_t* wstdin = kwsysEncoding_DupToWide(cp->PipeFileSTDIN); DWORD error; cp->PipeChildStd[0] = - CreateFileW(wstdin, GENERIC_READ | GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING, 0, 0); + CreateFileW(wstdin, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, + OPEN_EXISTING, 0, 0); error = GetLastError(); /* Check now in case free changes this. */ free(wstdin); if (cp->PipeChildStd[0] == INVALID_HANDLE_VALUE) { diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index 476fe08..0a4ad7a 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -3640,11 +3640,11 @@ bool SystemTools::Split(const std::string& str, while (lpos < data.length()) { std::string::size_type rpos = data.find_first_of(separator, lpos); if (rpos == std::string::npos) { - // Line ends at end of string without a newline. + // String ends at end of string without a separator. lines.push_back(data.substr(lpos)); return false; } else { - // Line ends in a "\n", remove the character. + // String ends in a separator, remove the character. lines.push_back(data.substr(lpos, rpos - lpos)); } lpos = rpos + 1; @@ -3658,7 +3658,7 @@ bool SystemTools::Split(const std::string& str, std::string data(str); std::string::size_type lpos = 0; while (lpos < data.length()) { - std::string::size_type rpos = data.find_first_of("\n", lpos); + std::string::size_type rpos = data.find_first_of('\n', lpos); if (rpos == std::string::npos) { // Line ends at end of string without a newline. lines.push_back(data.substr(lpos)); |