inpcom.c, expand_section_ref(), #4/7, drop 'cend', use 'c' instead

This commit is contained in:
rlar 2017-04-22 12:29:39 +02:00
parent 0c94a651ee
commit a77db80a85
1 changed files with 7 additions and 7 deletions

View File

@ -2418,7 +2418,7 @@ expand_section_ref(struct line *c, char *dir_name)
/* insert the library section definition into `c' */ /* insert the library section definition into `c' */
{ {
struct line *cend = c, *newl; struct line *newl;
struct line *rest = c->li_next; struct line *rest = c->li_next;
struct line *t = section_def; struct line *t = section_def;
for (; t; t=t->li_next) { for (; t; t=t->li_next) {
@ -2427,8 +2427,8 @@ expand_section_ref(struct line *c, char *dir_name)
newl->li_line[0] = '*'; newl->li_line[0] = '*';
newl->li_line[1] = '<'; newl->li_line[1] = '<';
} }
cend->li_next = newl; c->li_next = newl;
cend = newl; c = newl;
if(ciprefix(".endl", t->li_line)) if(ciprefix(".endl", t->li_line))
break; break;
} }
@ -2436,11 +2436,11 @@ expand_section_ref(struct line *c, char *dir_name)
fprintf(stderr, "ERROR, .endl not found\n"); fprintf(stderr, "ERROR, .endl not found\n");
controlled_exit(EXIT_FAILURE); controlled_exit(EXIT_FAILURE);
} }
cend->li_line[0] = '*'; c->li_line[0] = '*';
cend->li_line[1] = '>'; c->li_line[1] = '>';
cend->li_next = rest; c->li_next = rest;
c = cend; c = c;
} }
*line = '*'; /* comment out .lib line */ *line = '*'; /* comment out .lib line */