]> git.cameronkatri.com Git - pw-darwin.git/blobdiff - libutil/pw_util.c
mdoc(7) police: remove extraneous .Pp before and/or after .Sh.
[pw-darwin.git] / libutil / pw_util.c
index 207da8f0d5bfd45551ce170b5714b3bbd1c2d0d0..ce9eba229afc28937beb2e7b075036ecfb2acaac 100644 (file)
@@ -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");