inpcom.c, cleanup `inp_fix_subckt()', use `line_free_x()'
This commit is contained in:
parent
e9d37d0637
commit
84252fee5e
|
|
@ -2171,9 +2171,7 @@ inp_fix_subckt(struct names *subckt_w_params, char *s)
|
||||||
inp_sort_params(first_param_card, head, NULL, NULL);
|
inp_sort_params(first_param_card, head, NULL, NULL);
|
||||||
|
|
||||||
/* create new ordered parameter string for subckt call */
|
/* create new ordered parameter string for subckt call */
|
||||||
c = head->li_next;
|
for (c = head->li_next; c; c = c->li_next)
|
||||||
tfree(head);
|
|
||||||
for (;c != NULL;) {
|
|
||||||
if (new_str == NULL) {
|
if (new_str == NULL) {
|
||||||
new_str = strdup(c->li_line);
|
new_str = strdup(c->li_line);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -2181,11 +2179,8 @@ inp_fix_subckt(struct names *subckt_w_params, char *s)
|
||||||
tfree(new_str);
|
tfree(new_str);
|
||||||
new_str = x;
|
new_str = x;
|
||||||
}
|
}
|
||||||
tfree(c->li_line);
|
|
||||||
head = c;
|
line_free_x(head, TRUE);
|
||||||
c = c->li_next;
|
|
||||||
tfree(head);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* create buffer and insert params: */
|
/* create buffer and insert params: */
|
||||||
buffer = tprintf("%s params: %s", s, new_str);
|
buffer = tprintf("%s params: %s", s, new_str);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue