aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/build/local-derivation-goal.cc2
-rw-r--r--src/libstore/globals.cc4
-rw-r--r--src/libstore/local-store.cc2
-rw-r--r--src/libstore/platform/darwin.cc8
4 files changed, 8 insertions, 8 deletions
diff --git a/src/libstore/build/local-derivation-goal.cc b/src/libstore/build/local-derivation-goal.cc
index 7d1d339e8..da2433326 100644
--- a/src/libstore/build/local-derivation-goal.cc
+++ b/src/libstore/build/local-derivation-goal.cc
@@ -1882,7 +1882,7 @@ void LocalDerivationGoal::runChild()
sandboxArgs.push_back("_ALLOW_LOCAL_NETWORKING");
sandboxArgs.push_back("1");
}
- if (sandbox_init_with_parameters(sandboxProfile.c_str(), 0, stringsToCharPtrs(sandboxArgs).data(), NULL)) {
+ if (sandbox_init_with_parameters(sandboxProfile.c_str(), 0, stringsToCharPtrs(sandboxArgs).data(), nullptr)) {
writeFull(STDERR_FILENO, "failed to configure sandbox\n");
_exit(1);
}
diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc
index 02d26e034..6cfa3ffac 100644
--- a/src/libstore/globals.cc
+++ b/src/libstore/globals.cc
@@ -177,14 +177,14 @@ static bool hasVirt() {
size_t size;
size = sizeof(hasVMM);
- if (sysctlbyname("kern.hv_vmm_present", &hasVMM, &size, NULL, 0) == 0) {
+ if (sysctlbyname("kern.hv_vmm_present", &hasVMM, &size, nullptr, 0) == 0) {
if (hasVMM)
return false;
}
// whether the kernel and hardware supports virt
size = sizeof(hvSupport);
- if (sysctlbyname("kern.hv_support", &hvSupport, &size, NULL, 0) == 0) {
+ if (sysctlbyname("kern.hv_support", &hvSupport, &size, nullptr, 0) == 0) {
return hvSupport == 1;
} else {
return false;
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index 10d43ee3e..f09d1bdab 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -557,7 +557,7 @@ void LocalStore::openDB(State & state, bool create)
if (sqlite3_exec(db, "pragma main.journal_size_limit = 1099511627776;", 0, 0, 0) != SQLITE_OK)
SQLiteError::throw_(db, "setting journal_size_limit");
int enable = 1;
- if (sqlite3_file_control(db, NULL, SQLITE_FCNTL_PERSIST_WAL, &enable) != SQLITE_OK)
+ if (sqlite3_file_control(db, nullptr, SQLITE_FCNTL_PERSIST_WAL, &enable) != SQLITE_OK)
SQLiteError::throw_(db, "setting persistent WAL mode");
}
diff --git a/src/libstore/platform/darwin.cc b/src/libstore/platform/darwin.cc
index 83b4b4183..1b591fde3 100644
--- a/src/libstore/platform/darwin.cc
+++ b/src/libstore/platform/darwin.cc
@@ -235,15 +235,15 @@ void DarwinLocalDerivationGoal::execBuilder(std::string builder, Strings args, S
if (drv->platform == "aarch64-darwin") {
// Unset kern.curproc_arch_affinity so we can escape Rosetta
int affinity = 0;
- sysctlbyname("kern.curproc_arch_affinity", NULL, NULL, &affinity, sizeof(affinity));
+ sysctlbyname("kern.curproc_arch_affinity", nullptr, nullptr, &affinity, sizeof(affinity));
cpu_type_t cpu = CPU_TYPE_ARM64;
- posix_spawnattr_setbinpref_np(&attrp, 1, &cpu, NULL);
+ posix_spawnattr_setbinpref_np(&attrp, 1, &cpu, nullptr);
} else if (drv->platform == "x86_64-darwin") {
cpu_type_t cpu = CPU_TYPE_X86_64;
- posix_spawnattr_setbinpref_np(&attrp, 1, &cpu, NULL);
+ posix_spawnattr_setbinpref_np(&attrp, 1, &cpu, nullptr);
}
- posix_spawn(NULL, builder.c_str(), NULL, &attrp, stringsToCharPtrs(args).data(), stringsToCharPtrs(envStrs).data());
+ posix_spawn(nullptr, builder.c_str(), nullptr, &attrp, stringsToCharPtrs(args).data(), stringsToCharPtrs(envStrs).data());
}
}