Skip to content

Commit a6fbd1a

Browse files
committed
Fix Windows build errors.
1 parent e167754 commit a6fbd1a

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

src/auth/trusted/AuthSspi.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ AuthSspi::AuthSspi()
118118
groupNames(*getDefaultMemoryPool()), sessionKey(*getDefaultMemoryPool())
119119
{
120120
TimeStamp timeOut;
121-
hasCredentials = initEntries() && (fAcquireCredentialsHandle(0,
122-
legacySSP ? NTLMSP_NAME_A : NEGOSSP_NAME_A,
123-
SECPKG_CRED_BOTH, 0, 0, 0, 0,
121+
hasCredentials = initEntries() && (fAcquireCredentialsHandle(nullptr,
122+
const_cast<SEC_CHAR*>(legacySSP ? NTLMSP_NAME_A : NEGOSSP_NAME_A),
123+
SECPKG_CRED_BOTH, nullptr, nullptr, 0, nullptr,
124124
&secHndl, &timeOut) == SEC_E_OK);
125125
}
126126

src/common/isc_sync.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2579,7 +2579,7 @@ bool SharedMemoryBase::remapFile(CheckStatusWrapper* statusVector,
25792579
!FlushViewOfFile(sh_mem_header, 0))
25802580
{
25812581
error(statusVector, "SetFilePointer", GetLastError());
2582-
return NULL;
2582+
return false;
25832583
}
25842584
}
25852585

@@ -2622,16 +2622,16 @@ bool SharedMemoryBase::remapFile(CheckStatusWrapper* statusVector,
26222622
if (file_obj == NULL)
26232623
{
26242624
error(statusVector, "CreateFileMapping", GetLastError());
2625-
return NULL;
2625+
return false;
26262626
}
26272627

26282628
MemoryHeader* const address = (MemoryHeader*) MapViewOfFile(file_obj, FILE_MAP_WRITE, 0, 0, 0);
26292629

2630-
if (address == NULL)
2630+
if (!address)
26312631
{
26322632
error(statusVector, "MapViewOfFile", GetLastError());
26332633
CloseHandle(file_obj);
2634-
return NULL;
2634+
return false;
26352635
}
26362636

26372637
if (flag)
@@ -2650,10 +2650,10 @@ bool SharedMemoryBase::remapFile(CheckStatusWrapper* statusVector,
26502650
if (!sh_mem_length_mapped)
26512651
{
26522652
error(statusVector, "sh_mem_length_mapped is 0", 0);
2653-
return NULL;
2653+
return false;
26542654
}
26552655

2656-
return (address);
2656+
return address != nullptr;
26572657
}
26582658
#endif
26592659

src/utilities/install/install.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -665,9 +665,9 @@ USHORT IncrementSharedCount(const TEXT* filename, err_handler_t err_handler)
665665

666666
HKEY hkey;
667667
LONG status = RegCreateKeyEx(HKEY_LOCAL_MACHINE, SHARED_KEY,
668-
0, "", REG_OPTION_NON_VOLATILE, KEY_READ | KEY_WRITE, 0, &hkey, 0);
668+
0, nullptr, REG_OPTION_NON_VOLATILE, KEY_READ | KEY_WRITE, 0, &hkey, 0);
669669
if (status != ERROR_SUCCESS)
670-
return (*err_handler) (status, "RegCreateKeyEx");
670+
return (*err_handler)(status, "RegCreateKeyEx");
671671

672672
DWORD count = 0;
673673
DWORD type, size = sizeof(count);
@@ -714,9 +714,9 @@ USHORT DecrementSharedCount(const TEXT* filename, bool sw_force, err_handler_t e
714714
HKEY hkey;
715715
DWORD disp;
716716
LONG status = RegCreateKeyEx(HKEY_LOCAL_MACHINE, SHARED_KEY,
717-
0, "", REG_OPTION_NON_VOLATILE, KEY_READ | KEY_WRITE, NULL, &hkey, &disp);
717+
0, nullptr, REG_OPTION_NON_VOLATILE, KEY_READ | KEY_WRITE, nullptr, &hkey, &disp);
718718
if (status != ERROR_SUCCESS)
719-
return (*err_handler) (status, "RegCreateKeyEx");
719+
return (*err_handler)(status, "RegCreateKeyEx");
720720

721721
LONG count = 0;
722722
if (! sw_force)

src/utilities/install/registry.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ USHORT REGISTRY_install(HKEY hkey_rootnode, const TEXT* directory, pfnRegError e
5555
SLONG status = RegCreateKeyEx(hkey_rootnode,
5656
REG_KEY_ROOT_INSTANCES,
5757
0,
58-
"",
58+
nullptr,
5959
REG_OPTION_NON_VOLATILE,
6060
KEY_WRITE,
61-
NULL, &hkey_instances, &disp);
61+
nullptr, &hkey_instances, &disp);
6262
if (status != ERROR_SUCCESS) {
63-
return (*err_handler) (status, "RegCreateKeyEx", NULL);
63+
return (*err_handler)(status, "RegCreateKeyEx", nullptr);
6464
}
6565

6666
TEXT path_name[MAXPATHLEN];

0 commit comments

Comments
 (0)