Don't depend on NULL's expansion being a pointer, cast it before it is passed

to variadic functions.

Approved by:	das (mentor)
This commit is contained in:
Stefan Farfeleder 2004-05-18 15:53:58 +00:00
parent 0a258c19b1
commit ec18ee18ad
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=129392
2 changed files with 5 additions and 4 deletions

View File

@ -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 */

View File

@ -499,7 +499,7 @@ doesyscmd(const char *cmd)
(void) close(p[0]);
(void) dup2(p[1], 1);
(void) close(p[1]);
execl(_PATH_BSHELL, "sh", "-c", cmd, NULL);
execl(_PATH_BSHELL, "sh", "-c", cmd, (char *)NULL);
exit(1);
default:
/* Read result in two stages, since m4's buffer is