X-Git-Url: https://git.cameronkatri.com/pw-darwin.git/blobdiff_plain/5cc3dcbb4b1ff86e884ca90d654447e83c91ac8f..e0170f6f5dc3c917af085ce1fd3fa7479a8bbf50:/libutil/pw_util.c?ds=sidebyside diff --git a/libutil/pw_util.c b/libutil/pw_util.c index 207da8f..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 (;;) { @@ -249,8 +249,12 @@ pw_error(name, err, eval) #ifdef YP extern int _use_yp; #endif /* YP */ - if (err) - warn(name); + if (err) { + if (name != NULL) + warn("%s", name); + else + warn(NULL); + } #ifdef YP if (_use_yp) warnx("NIS information unchanged");