diff options
author | brian <brian@FreeBSD.org> | 2001-07-09 09:24:06 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2001-07-09 09:24:06 +0000 |
commit | 8636b161b333b18525b6f5ffc5139079c29c0d63 (patch) | |
tree | a109115514a8774e981280efca775db8a410df5b /gnu | |
parent | ef44874abb9460f2956eba8e3233154af304f5b1 (diff) | |
download | FreeBSD-src-8636b161b333b18525b6f5ffc5139079c29c0d63.zip FreeBSD-src-8636b161b333b18525b6f5ffc5139079c29c0d63.tar.gz |
Fix the type of the NULL arg to execl()
Idea from: Theo de Raadt <deraadt@openbsd.org>
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/lib/libdialog/raw_popen.c | 4 | ||||
-rw-r--r-- | gnu/usr.bin/as/input-file.c | 4 | ||||
-rw-r--r-- | gnu/usr.bin/tar/buffer.c | 4 |
3 files changed, 8 insertions, 4 deletions
diff --git a/gnu/lib/libdialog/raw_popen.c b/gnu/lib/libdialog/raw_popen.c index fabf91e..add71f1 100644 --- a/gnu/lib/libdialog/raw_popen.c +++ b/gnu/lib/libdialog/raw_popen.c @@ -32,6 +32,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ #if defined(LIBC_SCCS) && !defined(lint) @@ -95,7 +97,7 @@ raw_popen(const char *program, char * const *argv, const char *type) (void)close(pdes[1]); } if (argv == NULL) - execl(_PATH_BSHELL, "sh", "-c", program, NULL); + execl(_PATH_BSHELL, "sh", "-c", program, (char *)NULL); else execvp(program, argv); _exit(127); diff --git a/gnu/usr.bin/as/input-file.c b/gnu/usr.bin/as/input-file.c index b9bb4be..23e6a32 100644 --- a/gnu/usr.bin/as/input-file.c +++ b/gnu/usr.bin/as/input-file.c @@ -173,8 +173,8 @@ int debugging; /* TRUE if we are debugging assembler. */ (void)dup2 (fd, fileno(stdout)); /* JF for testing #define PREPROCESSOR "/lib/app" */ #define PREPROCESSOR "./app" - execl (PREPROCESSOR, PREPROCESSOR, 0); - execl ("app","app",0); + execl (PREPROCESSOR, PREPROCESSOR, (char *)0); + execl ("app","app",(char *)0); (void)write(2,"Exec of app failed. Get help.\n",31); (void)unlink(temporary_file_name); _exit (11); diff --git a/gnu/usr.bin/tar/buffer.c b/gnu/usr.bin/tar/buffer.c index eb7e3ef..a49f59b 100644 --- a/gnu/usr.bin/tar/buffer.c +++ b/gnu/usr.bin/tar/buffer.c @@ -21,6 +21,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ * Buffer management for tar. * * Written by John Gilmore, ihnp4!hoptoad!gnu, on 25 August 1985. + * + * $FreeBSD$ */ #include <stdio.h> @@ -1505,7 +1507,7 @@ tryagain: p = getenv ("SHELL"); if (p == 0) p = "/bin/sh"; - execlp (p, "-sh", "-i", 0); + execlp (p, "-sh", "-i", (char *)0); msg_perror ("can't exec a shell %s", p); _exit (55); default: |