Use (char *)NULL to terminate the argument list for execlp().

Without this cast the compiler cannot know that it has to convert the
null pointer constant NULL to a null pointer.
This commit is contained in:
harti 2003-10-30 15:04:37 +00:00
parent 5c97afb19f
commit b0eec1c6c2

View File

@ -423,7 +423,7 @@ edit_label(struct sun_disklabel *sl, const char *disk, const char *bootpath)
if (pid == 0) {
if ((editor = getenv("EDITOR")) == NULL)
editor = _PATH_VI;
execlp(editor, editor, tmpfil, NULL);
execlp(editor, editor, tmpfil, (char *)NULL);
err(1, "execlp %s", editor);
}
status = 0;