]> git.cameronkatri.com Git - pw-darwin.git/commitdiff
Don't depend on NULL's expansion being a pointer, cast it before it is passed
authorStefan Farfeleder <stefanf@FreeBSD.org>
Tue, 18 May 2004 15:53:58 +0000 (15:53 +0000)
committerStefan Farfeleder <stefanf@FreeBSD.org>
Tue, 18 May 2004 15:53:58 +0000 (15:53 +0000)
to variadic functions.

Approved by: das (mentor)

libutil/pw_util.c

index 708583d05877c92edbe5239ce81e231bb4262dd8..90c9d72f4f93ce6838cc492d9a324bee741e4e58 100644 (file)
@@ -266,10 +266,11 @@ pw_mkdb(const char *user)
                /* child */
                if (user == NULL)
                        execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p",
                /* 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",
                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:
                _exit(1);
                /* NOTREACHED */
        default:
@@ -321,7 +322,7 @@ pw_edit(int notsetuid)
                        (void)setuid(getuid());
                }
                errno = 0;
                        (void)setuid(getuid());
                }
                errno = 0;
-               execlp(editor, basename(editor), tempname, NULL);
+               execlp(editor, basename(editor), tempname, (char *)NULL);
                _exit(errno);
        default:
                /* parent */
                _exit(errno);
        default:
                /* parent */