about summary refs log tree commit diff
path: root/third_party/nix/src/libutil/config.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libutil/config.cc')
-rw-r--r--third_party/nix/src/libutil/config.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/third_party/nix/src/libutil/config.cc b/third_party/nix/src/libutil/config.cc
index 56f0c8c3e7cd..ef47c167ed49 100644
--- a/third_party/nix/src/libutil/config.cc
+++ b/third_party/nix/src/libutil/config.cc
@@ -303,7 +303,7 @@ template class BaseSetting<Strings>;
 template class BaseSetting<StringSet>;
 
 void PathSetting::set(const std::string& str) {
-  if (str == "") {
+  if (str.empty()) {
     if (allowEmpty) {
       value = "";
     } else {
@@ -356,7 +356,7 @@ GlobalConfig globalConfig;
 GlobalConfig::ConfigRegistrations* GlobalConfig::configRegistrations;
 
 GlobalConfig::Register::Register(Config* config) {
-  if (!configRegistrations) {
+  if (configRegistrations == nullptr) {
     configRegistrations = new ConfigRegistrations;
   }
   configRegistrations->emplace_back(config);