mirror of
https://github.com/mirror/make.git
synced 2025-02-09 19:31:08 +08:00
Make sure to assign a boolean value to a 1-bit bitfield. Reported on
the bug-make mailing list. Fix Savannah bug # 14527: remember to free temporary line constructor memory if the line is empty.
This commit is contained in:
parent
5ee856d96d
commit
66459baee2
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
|||||||
|
2005-09-26 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* job.c (construct_command_argv_internal): If the line is empty
|
||||||
|
remember to free the temporary argv strings.
|
||||||
|
Fixes bug # 14527.
|
||||||
|
|
||||||
|
2005-09-16 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* job.c (start_job_command): The noerror flag is a boolean (single
|
||||||
|
bit); set it appropriately.
|
||||||
|
Reported by Mark Eichin <eichin@metacarta.com>
|
||||||
|
|
||||||
2005-08-29 Paul D. Smith <psmith@gnu.org>
|
2005-08-29 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
* function.c (func_error): On Windows, output from $(info ...)
|
* function.c (func_error): On Windows, output from $(info ...)
|
||||||
|
17
job.c
17
job.c
@ -987,7 +987,7 @@ start_job_command (struct child *child)
|
|||||||
| child->file->cmds->lines_flags[child->command_line - 1]);
|
| child->file->cmds->lines_flags[child->command_line - 1]);
|
||||||
|
|
||||||
p = child->command_ptr;
|
p = child->command_ptr;
|
||||||
child->noerror = flags & COMMANDS_NOERROR;
|
child->noerror = ((flags & COMMANDS_NOERROR) != 0);
|
||||||
|
|
||||||
while (*p != '\0')
|
while (*p != '\0')
|
||||||
{
|
{
|
||||||
@ -2298,6 +2298,7 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
|
|||||||
char *end;
|
char *end;
|
||||||
int instring, word_has_equals, seen_nonequals, last_argument_was_empty;
|
int instring, word_has_equals, seen_nonequals, last_argument_was_empty;
|
||||||
char **new_argv = 0;
|
char **new_argv = 0;
|
||||||
|
char *argstr = 0;
|
||||||
#ifdef WINDOWS32
|
#ifdef WINDOWS32
|
||||||
int slow_flag = 0;
|
int slow_flag = 0;
|
||||||
|
|
||||||
@ -2384,7 +2385,7 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
|
|||||||
new_argv = (char **) xmalloc (i * sizeof (char *));
|
new_argv = (char **) xmalloc (i * sizeof (char *));
|
||||||
|
|
||||||
/* All the args can fit in a buffer as big as LINE is. */
|
/* All the args can fit in a buffer as big as LINE is. */
|
||||||
ap = new_argv[0] = (char *) xmalloc (i);
|
ap = new_argv[0] = argstr = (char *) xmalloc (i);
|
||||||
end = ap + i;
|
end = ap + i;
|
||||||
|
|
||||||
/* I is how many complete arguments have been found. */
|
/* I is how many complete arguments have been found. */
|
||||||
@ -2598,8 +2599,12 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (new_argv[0] == 0)
|
if (new_argv[0] == 0)
|
||||||
/* Line was empty. */
|
{
|
||||||
return 0;
|
/* Line was empty. */
|
||||||
|
free (argstr);
|
||||||
|
free ((char *)new_argv);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
return new_argv;
|
return new_argv;
|
||||||
|
|
||||||
@ -2609,8 +2614,8 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
|
|||||||
if (new_argv != 0)
|
if (new_argv != 0)
|
||||||
{
|
{
|
||||||
/* Free the old argument list we were working on. */
|
/* Free the old argument list we were working on. */
|
||||||
free (new_argv[0]);
|
free (argstr);
|
||||||
free ((void *)new_argv);
|
free ((char *)new_argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __MSDOS__
|
#ifdef __MSDOS__
|
||||||
|
@ -446,7 +446,7 @@ lookup_variable_in_set (const char *name, unsigned int length,
|
|||||||
void
|
void
|
||||||
initialize_file_variables (struct file *file, int reading)
|
initialize_file_variables (struct file *file, int reading)
|
||||||
{
|
{
|
||||||
register struct variable_set_list *l = file->variables;
|
struct variable_set_list *l = file->variables;
|
||||||
|
|
||||||
if (l == 0)
|
if (l == 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user