summaryrefslogtreecommitdiff
path: root/bin/ksh/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ksh/main.c')
-rw-r--r--bin/ksh/main.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/bin/ksh/main.c b/bin/ksh/main.c
index 4c86593393a..63ec3324c67 100644
--- a/bin/ksh/main.c
+++ b/bin/ksh/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.59 2015/09/17 14:21:33 nicm Exp $ */
+/* $OpenBSD: main.c,v 1.60 2015/09/18 07:28:24 nicm Exp $ */
/*
* startup, main loop, environments and error handling
@@ -272,7 +272,7 @@ main(int argc, char *argv[])
/* this to note if monitor is set on command line (see below) */
Flag(FMONITOR) = 127;
- argi = parse_args(argv, OF_CMDLINE, (int *) 0);
+ argi = parse_args(argv, OF_CMDLINE, NULL);
if (argi < 0)
exit(1);
@@ -295,8 +295,7 @@ main(int argc, char *argv[])
Flag(FSTDIN) = 1;
s = pushs(SSTDIN, ATEMP);
s->file = "<stdin>";
- s->u.shf = shf_fdopen(0, SHF_RD | can_seek(0),
- (struct shf *) 0);
+ s->u.shf = shf_fdopen(0, SHF_RD | can_seek(0), NULL);
if (isatty(0) && isatty(2)) {
Flag(FTALKING) = Flag(FTALKING_I) = 1;
/* The following only if isatty(0) */
@@ -343,14 +342,13 @@ main(int argc, char *argv[])
warningf(false, "Cannot determine current working directory");
if (Flag(FLOGIN)) {
- include(KSH_SYSTEM_PROFILE, 0, (char **) 0, 1);
+ include(KSH_SYSTEM_PROFILE, 0, NULL, 1);
if (!Flag(FPRIVILEGED))
- include(substitute("$HOME/.profile", 0), 0,
- (char **) 0, 1);
+ include(substitute("$HOME/.profile", 0), 0, NULL, 1);
}
if (Flag(FPRIVILEGED))
- include("/etc/suid_profile", 0, (char **) 0, 1);
+ include("/etc/suid_profile", 0, NULL, 1);
else if (Flag(FTALKING)) {
char *env_file;
@@ -364,7 +362,7 @@ main(int argc, char *argv[])
#endif /* DEFAULT_ENV */
env_file = substitute(env_file, DOTILDE);
if (*env_file != '\0')
- include(env_file, 0, (char **) 0, 1);
+ include(env_file, 0, NULL, 1);
}
if (is_restricted(argv[0]) || is_restricted(str_val(global("SHELL"))))
@@ -423,7 +421,7 @@ include(const char *name, int argc, char **argv, int intr_ok)
old_argv = e->loc->argv;
old_argc = e->loc->argc;
} else {
- old_argv = (char **) 0;
+ old_argv = NULL;
old_argc = 0;
}
newenv(E_INCL);
@@ -729,10 +727,10 @@ cleanup_parents_env(void)
if (ep->savefd[fd] > 0)
close(ep->savefd[fd]);
afree(ep->savefd, &ep->area);
- ep->savefd = (short *) 0;
+ ep->savefd = NULL;
}
}
- e->oenv = (struct env *) 0;
+ e->oenv = NULL;
}
/* Called just before an execve cleanup stuff temporary files */