summaryrefslogtreecommitdiffstats
path: root/libutil/pw_util.c
diff options
context:
space:
mode:
authorStefan Farfeleder <stefanf@FreeBSD.org>2004-05-18 15:53:58 +0000
committerStefan Farfeleder <stefanf@FreeBSD.org>2004-05-18 15:53:58 +0000
commit47742242fa3abeb1a59690c8ac494a080a0f4f2b (patch)
tree57acd1badb55daff164d221bdb18c9581035538b /libutil/pw_util.c
parent04f152c2c02895d10620868a6c6ebcd7bd5d4e49 (diff)
downloadpw-darwin-47742242fa3abeb1a59690c8ac494a080a0f4f2b.tar.gz
pw-darwin-47742242fa3abeb1a59690c8ac494a080a0f4f2b.tar.zst
pw-darwin-47742242fa3abeb1a59690c8ac494a080a0f4f2b.zip
Don't depend on NULL's expansion being a pointer, cast it before it is passed
to variadic functions. Approved by: das (mentor)
Diffstat (limited to 'libutil/pw_util.c')
-rw-r--r--libutil/pw_util.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libutil/pw_util.c b/libutil/pw_util.c
index 708583d..90c9d72 100644
--- a/libutil/pw_util.c
+++ b/libutil/pw_util.c
@@ -266,10 +266,11 @@ pw_mkdb(const char *user)
/* child */
if (user == NULL)
execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p",
- "-d", passwd_dir, tempname, NULL);
+ "-d", passwd_dir, tempname, (char *)NULL);
else
execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p",
- "-d", passwd_dir, "-u", user, tempname, NULL);
+ "-d", passwd_dir, "-u", user, tempname,
+ (char *)NULL);
_exit(1);
/* NOTREACHED */
default:
@@ -321,7 +322,7 @@ pw_edit(int notsetuid)
(void)setuid(getuid());
}
errno = 0;
- execlp(editor, basename(editor), tempname, NULL);
+ execlp(editor, basename(editor), tempname, (char *)NULL);
_exit(errno);
default:
/* parent */