about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorWill Dietz <w@wdtz.org>2018-03-21T22·17-0500
committerWill Dietz <w@wdtz.org>2018-03-21T22·17-0500
commitf66ae2228880ba757af7dfcd216408ff95abaeba (patch)
tree7b09c19e0881898c3b09b0dfd31f0ac33c27f4b0 /src
parent02d36fdab7415cd57dc09ca36f20e195977b7641 (diff)
shared.cc: style: prefer "nullptr" over '(char *)NULL'
Diffstat (limited to 'src')
-rw-r--r--src/libmain/shared.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index 1445c8f0301a..91a4eaf922a6 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -263,7 +263,7 @@ void showManPage(const string & name)
 {
     restoreSignals();
     setenv("MANPATH", settings.nixManDir.c_str(), 1);
-    execlp("man", "man", name.c_str(), (char *)NULL);
+    execlp("man", "man", name.c_str(), nullptr);
     throw SysError(format("command 'man %1%' failed") % name.c_str());
 }
 
@@ -325,10 +325,10 @@ RunPager::RunPager()
             setenv("LESS", "FRSXMK", 1);
         restoreSignals();
         if (pager)
-            execl("/bin/sh", "sh", "-c", pager, (char *)NULL);
-        execlp("pager", "pager", (char *)NULL);
-        execlp("less", "less", (char *)NULL);
-        execlp("more", "more", (char *)NULL);
+            execl("/bin/sh", "sh", "-c", pager, nullptr);
+        execlp("pager", "pager", nullptr);
+        execlp("less", "less", nullptr);
+        execlp("more", "more", nullptr);
         throw SysError(format("executing '%1%'") % pager);
     });