summaryrefslogtreecommitdiffhomepage
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index 4139241..43026f6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -260,7 +260,7 @@ const char *shell_path(void) {
path = full;
} else {
const char *search = var_get("PATH");
- char *found = search ? path_search(name, search, true) : NULL;
+ char *found = search ? path_search(name, search, true) : nullptr;
path = found ? xstrdup(found) : "/bin/sh";
}
return path;
@@ -287,7 +287,7 @@ void exit_shell(int status) {
code = exitstatus; /* the trap called exit itself */
}
}
- exc_handler = NULL;
+ exc_handler = nullptr;
if (!in_subshell) {
interact_exit();
jc_exit();
@@ -407,8 +407,8 @@ static void usage_print(output *o, bool full) {
*/
int main(int argc, char **argv) {
jmploc jl;
- const char *volatile script = NULL;
- const char *volatile command = NULL;
+ const char *volatile script = nullptr;
+ const char *volatile command = nullptr;
volatile bool in_args = false; /* read after longjmp: must be volatile */
bool ignored = false;
@@ -459,7 +459,7 @@ int main(int argc, char **argv) {
arg0 = script;
}
in_args = false;
- shellparam = (shparam){argc - i, argv + i, NULL};
+ shellparam = (shparam){argc - i, argv + i, nullptr};
if (!command && !script) {
opt.stdin_cmds = true;