aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/platform
diff options
context:
space:
mode:
authorJade Lovelace <lix@jade.fyi>2024-07-23 21:06:55 +0200
committerJade Lovelace <lix@jade.fyi>2024-07-23 21:06:55 +0200
commit2436f2110af7cf305ebe5198e5e330cfcdd3a2c6 (patch)
tree131a0049f61c7a4459f4f53fa43079f45175e01d /src/libstore/platform
parent916b5c68fb14fd77c739b05595211b2b008f99f9 (diff)
tree-wide: NULL -> nullptr
This is slightly more type safe and is more in line with modern C++. Change-Id: Ia7a8df1c7788085020d1bdc941d6f9cee356144e
Diffstat (limited to 'src/libstore/platform')
-rw-r--r--src/libstore/platform/darwin.cc8
1 files changed, 4 insertions, 4 deletions
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());
}
}