diff --git a/src/ChangeLog b/src/ChangeLog index 4fc6ff932..33c4d13d3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2004-09-24 Roland Illig + + * cons.handler.c (handle_console_linux): Replaced NULL with + (char *) NULL in call to execl. + * subshell.c (init_subshell_child): Likewise. + * utilunix.c (my_system): Likewise. + + From patches from the OpenBSD ports collection. + 2004-09-23 Roland Illig * main.c (OS_Setup): Fixed segmentation fault. diff --git a/src/cons.handler.c b/src/cons.handler.c index 39c88b545..2dcbda9a8 100644 --- a/src/cons.handler.c +++ b/src/cons.handler.c @@ -145,7 +145,7 @@ handle_console_linux (unsigned char action) if (tty_name) { /* Exec the console save/restore handler */ mc_conssaver = concat_dir_and_file (LIBDIR, "cons.saver"); - execl (mc_conssaver, "cons.saver", tty_name, NULL); + execl (mc_conssaver, "cons.saver", tty_name, (char *) NULL); } /* Console is not a tty or execl() failed */ console_flag = 0; diff --git a/src/subshell.c b/src/subshell.c index 7e8a093fe..8743d080a 100644 --- a/src/subshell.c +++ b/src/subshell.c @@ -266,17 +266,17 @@ init_subshell_child (const char *pty_name) switch (subshell_type) { case BASH: - execl (shell, "bash", "-rcfile", init_file, NULL); + execl (shell, "bash", "-rcfile", init_file, (char *) NULL); break; case TCSH: - execl (shell, "tcsh", NULL); + execl (shell, "tcsh", (char *) NULL); break; case ZSH: /* Use -g to exclude cmds beginning with space from history * and -Z to use the line editor on non-interactive term */ - execl (shell, "zsh", "-Z", "-g", NULL); + execl (shell, "zsh", "-Z", "-g", (char *) NULL); break; } diff --git a/src/utilunix.c b/src/utilunix.c index 72c799070..527c17b6d 100644 --- a/src/utilunix.c +++ b/src/utilunix.c @@ -234,9 +234,9 @@ int my_system (int flags, const char *shell, const char *command) signal (SIGCHLD, SIG_DFL); if (flags & EXECUTE_AS_SHELL) - execl (shell, shell, "-c", command, NULL); + execl (shell, shell, "-c", command, (char *) NULL); else - execlp (shell, shell, command, NULL); + execlp (shell, shell, command, (char *) NULL); _exit (127); /* Exec error */ } else {