cppspec.c: Put a null pointer at the end of the new argv.

1999-08-23 22:23 -0700  Zack Weinberg  <zack@bitmover.com>

	* cppspec.c: Put a null pointer at the end of the new argv.

From-SVN: r28813
This commit is contained in:
Zack Weinberg 1999-08-24 05:31:03 +00:00 committed by Zack Weinberg
parent 732d9b8ce2
commit 3ed4f5ed4b
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,7 @@
1999-08-23 22:23 -0700 Zack Weinberg <zack@bitmover.com>
* cppspec.c: Put a null pointer at the end of the new argv.
Mon Aug 23 21:23:24 1999 Jeffrey A Law (law@cygnus.com)
* configure.in: Remove code to select/de-select the haifa

View File

@ -194,7 +194,8 @@ lang_specific_driver (errfn, in_argc, in_argv, in_added_libraries)
if (new_argc == argc)
return;
new_argv = (char **) xmalloc (new_argc * sizeof(char *));
/* One more slot for a terminating null. */
new_argv = (char **) xmalloc ((new_argc + 1) * sizeof(char *));
new_argv[0] = argv[0];
j = 1;
@ -218,8 +219,9 @@ lang_specific_driver (errfn, in_argc, in_argv, in_added_libraries)
}
if (read_stdin)
new_argv[j] = "-";
new_argv[j++] = "-";
new_argv[j] = NULL;
*in_argc = new_argc;
*in_argv = new_argv;
}