summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2001-07-09 09:24:06 +0000
committerBrian Somers <brian@FreeBSD.org>2001-07-09 09:24:06 +0000
commit5442276cd021d5fe2943c1c124bf45f6ca8f863e (patch)
tree087366383376badfe4eb3d5aefe50299e41a9afd
parentd3b365d80ac966d7ad94c410b53a478e566d347b (diff)
downloadpw-darwin-5442276cd021d5fe2943c1c124bf45f6ca8f863e.tar.gz
pw-darwin-5442276cd021d5fe2943c1c124bf45f6ca8f863e.tar.zst
pw-darwin-5442276cd021d5fe2943c1c124bf45f6ca8f863e.zip
Fix the type of the NULL arg to execl()
Idea from: Theo de Raadt <deraadt@openbsd.org>
-rw-r--r--libutil/pw_util.c6
-rw-r--r--pw/pw.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/libutil/pw_util.c b/libutil/pw_util.c
index c6c70ff..ce9eba2 100644
--- a/libutil/pw_util.c
+++ b/libutil/pw_util.c
@@ -174,11 +174,11 @@ char *username;
if(!username) {
warnx("rebuilding the database...");
execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", "-d", mppath,
- tempname, NULL);
+ tempname, (char *)NULL);
} else {
warnx("updating the database...");
execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", "-d", mppath,
- "-u", username, tempname, NULL);
+ "-u", username, tempname, (char *)NULL);
}
pw_error(_PATH_PWD_MKDB, 1, 1);
}
@@ -209,7 +209,7 @@ pw_edit(notsetuid)
(void)setuid(getuid());
}
errno = 0;
- execlp(editor, p, tempname, NULL);
+ execlp(editor, p, tempname, (char *)NULL);
_exit(errno);
}
for (;;) {
diff --git a/pw/pw.c b/pw/pw.c
index b59b9f9..01ba43a 100644
--- a/pw/pw.c
+++ b/pw/pw.c
@@ -248,7 +248,7 @@ main(int argc, char *argv[])
warn("fork()");
else if (pid == 0) {
/* Is make anywhere else? */
- execlp("/usr/bin/make", "make", NULL);
+ execlp("/usr/bin/make", "make", (char *)NULL);
_exit(1);
} else {
int i;