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:
parent
5c97afb19f
commit
b0eec1c6c2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user