don't free prototype lists, they might be part of a typedef
This commit is contained in:
parent
dd5ef3905f
commit
a3f1aaa41f
|
@ -290,7 +290,6 @@ update_proto(tp, otp)
|
||||||
|
|
||||||
pl = tp->tp_proto;
|
pl = tp->tp_proto;
|
||||||
opl = otp->tp_proto;
|
opl = otp->tp_proto;
|
||||||
if (pl == opl) return;
|
|
||||||
if (pl && opl) {
|
if (pl && opl) {
|
||||||
/* both have prototypes */
|
/* both have prototypes */
|
||||||
while (pl && opl) {
|
while (pl && opl) {
|
||||||
|
@ -298,7 +297,9 @@ update_proto(tp, otp)
|
||||||
pl = pl->next;
|
pl = pl->next;
|
||||||
opl = opl->next;
|
opl = opl->next;
|
||||||
}
|
}
|
||||||
free_proto_list(otp->tp_proto);
|
/* Do not free the old prototype list. It might be part of
|
||||||
|
* a typedef.
|
||||||
|
*/
|
||||||
otp->tp_proto = tp->tp_proto;
|
otp->tp_proto = tp->tp_proto;
|
||||||
} else if (opl) {
|
} else if (opl) {
|
||||||
/* old decl has type */
|
/* old decl has type */
|
||||||
|
@ -309,16 +310,6 @@ update_proto(tp, otp)
|
||||||
update_proto(tp->tp_up, otp->tp_up);
|
update_proto(tp->tp_up, otp->tp_up);
|
||||||
}
|
}
|
||||||
|
|
||||||
free_proto_list(pl)
|
|
||||||
register struct proto *pl;
|
|
||||||
{
|
|
||||||
while (pl) {
|
|
||||||
register struct proto *tmp = pl->next;
|
|
||||||
free_proto(pl);
|
|
||||||
pl = tmp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* struct/union and enum tags can be declared inside prototypes
|
/* struct/union and enum tags can be declared inside prototypes
|
||||||
* remove them from the symbol-table
|
* remove them from the symbol-table
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue