diff options
| author | Patrick Bader <mail@patrickbader.eu> | 2017-01-06 19:09:17 +0100 |
|---|---|---|
| committer | Patrick Bader <mail@patrickbader.eu> | 2017-01-06 19:09:17 +0100 |
| commit | 04f8da985c9acdd090055ad06bcf75eb20af1987 (patch) | |
| tree | 76ae8c42d498f0c2d607c891eac50f41f06d1269 /toolsrc/src/metrics.cpp | |
| parent | 44c86f56db351da15e5a2b2fcca62656ab8cccbf (diff) | |
| parent | ff10939203b7694f21d8e8e0464f092dff1b4eb0 (diff) | |
| download | vcpkg-04f8da985c9acdd090055ad06bcf75eb20af1987.tar.gz vcpkg-04f8da985c9acdd090055ad06bcf75eb20af1987.zip | |
Merge branch 'master' of https://github.com/Microsoft/vcpkg
Diffstat (limited to 'toolsrc/src/metrics.cpp')
| -rw-r--r-- | toolsrc/src/metrics.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/toolsrc/src/metrics.cpp b/toolsrc/src/metrics.cpp index 51c7179c8..1806dad87 100644 --- a/toolsrc/src/metrics.cpp +++ b/toolsrc/src/metrics.cpp @@ -237,13 +237,13 @@ true std::wstring GetSQMUser() { - LONG err = NULL; + LONG err; struct RAII_HKEY { - HKEY hkey = NULL; + HKEY hkey = nullptr; ~RAII_HKEY() { - if (hkey != NULL) + if (hkey != nullptr) RegCloseKey(hkey); } } HKCU_SQMClient; @@ -257,7 +257,7 @@ true std::array<wchar_t,128> buffer; DWORD lType = 0; DWORD dwBufferSize = static_cast<DWORD>(buffer.size() * sizeof(wchar_t)); - err = RegQueryValueExW(HKCU_SQMClient.hkey, L"UserId", NULL, &lType, reinterpret_cast<LPBYTE>(buffer.data()), &dwBufferSize); + err = RegQueryValueExW(HKCU_SQMClient.hkey, L"UserId", nullptr, &lType, reinterpret_cast<LPBYTE>(buffer.data()), &dwBufferSize); if (err == ERROR_SUCCESS && lType == REG_SZ && dwBufferSize >= sizeof(wchar_t)) { size_t sz = dwBufferSize / sizeof(wchar_t); |
