From: Christoph Mallon Date: Fri, 3 Oct 2008 18:54:42 +0000 (+0000) Subject: Fix last commit. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=eb167275cf15e3de07cfc08ffad6ea68e9369411;p=libfirm Fix last commit. [r22444] --- diff --git a/vector.c b/vector.c index 5251a9ed4..2134368f4 100644 --- a/vector.c +++ b/vector.c @@ -19,12 +19,11 @@ vector *vector_alloc(pbqp *pbqp, unsigned length) vector *vector_copy(pbqp *pbqp, vector *v) { - vector *copy = obstack_alloc(&pbqp->obstack, sizeof(*copy) + sizeof(*copy->entries) * length); + unsigned len = v->len; + vector *copy = obstack_alloc(&pbqp->obstack, sizeof(*copy) + sizeof(*copy->entries) * len); assert(copy); - unsigned len = v->len; - copy->len = len; memcpy(copy->entries, v->entries, sizeof(*copy->entries) * len);