diff --git a/src/auth/trusted/AuthSspi.cpp b/src/auth/trusted/AuthSspi.cpp index 515271b1ec9..9cedeaccc9a 100644 --- a/src/auth/trusted/AuthSspi.cpp +++ b/src/auth/trusted/AuthSspi.cpp @@ -119,7 +119,7 @@ AuthSspi::AuthSspi() { TimeStamp timeOut; hasCredentials = initEntries() && (fAcquireCredentialsHandle(0, - legacySSP ? NTLMSP_NAME_A : NEGOSSP_NAME_A, + const_cast(legacySSP ? NTLMSP_NAME_A : NEGOSSP_NAME_A), SECPKG_CRED_BOTH, 0, 0, 0, 0, &secHndl, &timeOut) == SEC_E_OK); } diff --git a/src/common/isc_sync.cpp b/src/common/isc_sync.cpp index ee2d9f82d57..62db352fa1b 100755 --- a/src/common/isc_sync.cpp +++ b/src/common/isc_sync.cpp @@ -2601,7 +2601,7 @@ bool SharedMemoryBase::remapFile(CheckStatusWrapper* statusVector, !FlushViewOfFile(sh_mem_header, 0)) { error(statusVector, "SetFilePointer", GetLastError()); - return NULL; + return false; } } @@ -2644,7 +2644,7 @@ bool SharedMemoryBase::remapFile(CheckStatusWrapper* statusVector, if (file_obj == NULL) { error(statusVector, "CreateFileMapping", GetLastError()); - return NULL; + return false; } MemoryHeader* const address = (MemoryHeader*) MapViewOfFile(file_obj, FILE_MAP_WRITE, 0, 0, 0); @@ -2653,7 +2653,7 @@ bool SharedMemoryBase::remapFile(CheckStatusWrapper* statusVector, { error(statusVector, "MapViewOfFile", GetLastError()); CloseHandle(file_obj); - return NULL; + return false; } if (flag) @@ -2672,7 +2672,7 @@ bool SharedMemoryBase::remapFile(CheckStatusWrapper* statusVector, if (!sh_mem_length_mapped) { error(statusVector, "sh_mem_length_mapped is 0", 0); - return NULL; + return false; } return (address); diff --git a/src/utilities/install/install.cpp b/src/utilities/install/install.cpp index 16a55f2b0e2..1858e1800ac 100644 --- a/src/utilities/install/install.cpp +++ b/src/utilities/install/install.cpp @@ -665,7 +665,7 @@ USHORT IncrementSharedCount(const TEXT* filename, err_handler_t err_handler) HKEY hkey; LONG status = RegCreateKeyEx(HKEY_LOCAL_MACHINE, SHARED_KEY, - 0, "", REG_OPTION_NON_VOLATILE, KEY_READ | KEY_WRITE, 0, &hkey, 0); + 0, NULL, REG_OPTION_NON_VOLATILE, KEY_READ | KEY_WRITE, 0, &hkey, 0); if (status != ERROR_SUCCESS) return (*err_handler) (status, "RegCreateKeyEx"); @@ -714,7 +714,7 @@ USHORT DecrementSharedCount(const TEXT* filename, bool sw_force, err_handler_t e HKEY hkey; DWORD disp; LONG status = RegCreateKeyEx(HKEY_LOCAL_MACHINE, SHARED_KEY, - 0, "", REG_OPTION_NON_VOLATILE, KEY_READ | KEY_WRITE, NULL, &hkey, &disp); + 0, NULL, REG_OPTION_NON_VOLATILE, KEY_READ | KEY_WRITE, NULL, &hkey, &disp); if (status != ERROR_SUCCESS) return (*err_handler) (status, "RegCreateKeyEx"); diff --git a/src/utilities/install/registry.cpp b/src/utilities/install/registry.cpp index 9b6a3304d2a..c8e2e69d780 100644 --- a/src/utilities/install/registry.cpp +++ b/src/utilities/install/registry.cpp @@ -55,7 +55,7 @@ USHORT REGISTRY_install(HKEY hkey_rootnode, const TEXT* directory, pfnRegError e SLONG status = RegCreateKeyEx(hkey_rootnode, REG_KEY_ROOT_INSTANCES, 0, - "", + NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hkey_instances, &disp);