From a537cc5503e5603f13c843b284499c6206de1b08 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Wed, 23 May 2012 16:47:34 -0300 Subject: [PATCH] b2/subst.c (parse_var): use unique_n --- b2/subst.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/b2/subst.c b/b2/subst.c index 8003ca3..5291c20 100644 --- a/b2/subst.c +++ b/b2/subst.c @@ -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;