1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-12-23 07:54:38 +02:00

b2/subst.c (parse_var): use unique_n

This commit is contained in:
Werner Almesberger 2012-05-23 16:47:34 -03:00
parent b9066c6331
commit a537cc5503

View File

@ -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;