shared.cc: style: prefer "nullptr" over '(char *)NULL'
This commit is contained in:
parent
02d36fdab7
commit
f66ae22288
|
@ -263,7 +263,7 @@ void showManPage(const string & name)
|
||||||
{
|
{
|
||||||
restoreSignals();
|
restoreSignals();
|
||||||
setenv("MANPATH", settings.nixManDir.c_str(), 1);
|
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());
|
throw SysError(format("command 'man %1%' failed") % name.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -325,10 +325,10 @@ RunPager::RunPager()
|
||||||
setenv("LESS", "FRSXMK", 1);
|
setenv("LESS", "FRSXMK", 1);
|
||||||
restoreSignals();
|
restoreSignals();
|
||||||
if (pager)
|
if (pager)
|
||||||
execl("/bin/sh", "sh", "-c", pager, (char *)NULL);
|
execl("/bin/sh", "sh", "-c", pager, nullptr);
|
||||||
execlp("pager", "pager", (char *)NULL);
|
execlp("pager", "pager", nullptr);
|
||||||
execlp("less", "less", (char *)NULL);
|
execlp("less", "less", nullptr);
|
||||||
execlp("more", "more", (char *)NULL);
|
execlp("more", "more", nullptr);
|
||||||
throw SysError(format("executing '%1%'") % pager);
|
throw SysError(format("executing '%1%'") % pager);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue