handle = CreateFile(lockfile.c_str(),
GENERIC_WRITE, // desired access
0, // shared mode (0 = not shared)
- NULL, // security attributes
+ nullptr, // security attributes
CREATE_ALWAYS, // creation disposition
flags, // flags and attributes
- NULL // template file
+ nullptr // template file
);
if (handle != INVALID_HANDLE_VALUE) {
break;
{
# ifndef _WIN32
const char* tmpdir = getenv("TMPDIR");
- if (tmpdir != NULL) {
+ if (tmpdir) {
return tmpdir;
}
# else
HANDLE path_handle = CreateFile(c_path,
GENERIC_READ,
FILE_SHARE_READ,
- NULL,
+ nullptr,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
- NULL);
+ nullptr);
if (INVALID_HANDLE_VALUE != path_handle) {
bool ok = GetFinalPathNameByHandle(
path_handle, buffer, buffer_size, FILE_NAME_NORMALIZED);
si.cb = sizeof(STARTUPINFO);
HANDLE pipe_out[2];
- SECURITY_ATTRIBUTES sa = {sizeof(SECURITY_ATTRIBUTES), NULL, TRUE};
+ SECURITY_ATTRIBUTES sa = {sizeof(SECURITY_ATTRIBUTES), nullptr, TRUE};
CreatePipe(&pipe_out[0], &pipe_out[1], &sa, 0);
SetHandleInformation(pipe_out[0], HANDLE_FLAG_INHERIT, 0);
si.hStdOutput = pipe_out[1];
# endif
# include <windows.h>
# define mkdir(a, b) mkdir(a)
-# define link(src, dst) (CreateHardLink(dst, src, NULL) ? 0 : -1)
+# define link(src, dst) (CreateHardLink(dst, src, nullptr) ? 0 : -1)
# define execv(a, b) win32execute(a, b, 0, -1, -1)
# define DIR_DELIM_CH '\\'
# define PATH_DELIM ";"