From c3e2c920ef03f3f3630ecfce4a4d59e84f3bcddb Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 22 Apr 2017 12:49:27 +0200 Subject: [PATCH] inpcom.c, inp_fix_subckt(), #3/4, drop 'last_param_card' --- src/frontend/inpcom.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 83f54e917..81f148ad8 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -2155,7 +2155,7 @@ find_name(struct names *p, char *name) static char* inp_fix_subckt(struct names *subckt_w_params, char *s) { - struct line *head = NULL, *first_param_card = NULL, *last_param_card = NULL, *c = NULL; + struct line *head = NULL, *first_param_card = NULL, *c = NULL; char *equal, *beg, *buffer, *ptr1, *ptr2, *new_str = NULL; equal = strchr(s, '='); @@ -2177,6 +2177,7 @@ inp_fix_subckt(struct names *subckt_w_params, char *s) head = insert_new_line(NULL, NULL, 0, 0); /* create list of parameters that need to get sorted */ + first_param_card = c = NULL; while ((ptr1 = strchr(beg, '=')) != NULL) { ptr2 = skip_ws(ptr1 + 1); ptr1 = skip_back_ws(ptr1, beg); @@ -2195,7 +2196,7 @@ inp_fix_subckt(struct names *subckt_w_params, char *s) beg = ptr2; - c = last_param_card = insert_new_line(last_param_card, copy_substring(ptr1, ptr2), 0, 0); + c = insert_new_line(c, copy_substring(ptr1, ptr2), 0, 0); if (!first_param_card) first_param_card = c;