mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-26 13:16:21 +02:00
b2/subst.c (parse_var): use unique_n
This commit is contained in:
parent
b9066c6331
commit
a537cc5503
@ -176,12 +176,8 @@ static const char *parse_var(struct chunk *c, const char *s)
|
||||
c->type = ct_sub;
|
||||
c->u.sub = *s-'0';
|
||||
} else if (isalnum(*s)) {
|
||||
char *tmp;
|
||||
|
||||
c->type = ct_var;
|
||||
tmp = stralloc_n(s, t-s);
|
||||
c->u.var = unique(tmp);
|
||||
free(tmp);
|
||||
c->u.var = unique_n(s, t-s);
|
||||
} else {
|
||||
c->type = ct_sub;
|
||||
c->u.sub = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user