cpphash.c (_cpp_free_definition): Test argnames, not nargs >= 0, before freeing argnames.
2000-04-04 Philippe De Muyter <phdm@macqel.be> * cpphash.c (_cpp_free_definition): Test argnames, not nargs >= 0, before freeing argnames. * cpplib.c (do_ifndef): Cast return value of xstrdup. From-SVN: r32924
This commit is contained in:
parent
a70902c59f
commit
05ecd0e9ab
3 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2000-04-04 Philippe De Muyter <phdm@macqel.be>
|
||||
|
||||
* cpphash.c (_cpp_free_definition): Test argnames, not nargs >= 0,
|
||||
before freeing argnames.
|
||||
* cpplib.c (do_ifndef): Cast return value of xstrdup.
|
||||
|
||||
2000-04-05 Michael Meissner <meissner@redhat.com>
|
||||
|
||||
* config/rs6000/rs6000.c (print_operand): Patch from Jonathan
|
||||
|
|
|
@ -256,7 +256,7 @@ _cpp_free_definition (d)
|
|||
nextap = ap->next;
|
||||
free (ap);
|
||||
}
|
||||
if (d->nargs >= 0)
|
||||
if (d->argnames)
|
||||
free (d->argnames);
|
||||
free (d);
|
||||
}
|
||||
|
|
|
@ -1309,7 +1309,7 @@ do_ifndef (pfile)
|
|||
skip = parse_ifdef (pfile, dtable[T_IFNDEF].name);
|
||||
|
||||
if (start_of_file && !skip)
|
||||
control_macro = xstrdup (CPP_PWRITTEN (pfile));
|
||||
control_macro = (U_CHAR *) xstrdup (CPP_PWRITTEN (pfile));
|
||||
|
||||
conditional_skip (pfile, skip, T_IFNDEF, control_macro);
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue