]> git.cameronkatri.com Git - pw-darwin.git/blobdiff - libutil/pw_util.c
remove emalloc,ecalloc,erealloc,estrdup
[pw-darwin.git] / libutil / pw_util.c
index 057b8bc37736e79877cfe6d56c98defca4e1f46e..ce9eba229afc28937beb2e7b075036ecfb2acaac 100644 (file)
@@ -36,7 +36,7 @@
 static const char sccsid[] = "@(#)pw_util.c    8.3 (Berkeley) 4/2/94";
 #endif
 static const char rcsid[] =
-       "$Id: pw_util.c,v 1.15 1999/06/26 12:15:37 pb Exp $";
+  "$FreeBSD$";
 #endif /* not lint */
 
 /*
@@ -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");