projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cfopt: use a hashmap for sparse block->data mapping
[libfirm]
/
ir
/
tr
/
compound_path.c
diff --git
a/ir/tr/compound_path.c
b/ir/tr/compound_path.c
index
6ac2ac5
..
11b19eb
100644
(file)
--- a/
ir/tr/compound_path.c
+++ b/
ir/tr/compound_path.c
@@
-44,8
+44,7
@@
compound_graph_path *new_compound_graph_path(ir_type *tp, size_t length)
assert(is_compound_type(tp) || is_Array_type(tp));
assert(length > 0);
assert(is_compound_type(tp) || is_Array_type(tp));
assert(length > 0);
- res = (compound_graph_path*)xmalloc(sizeof(*res) + (length-1) * sizeof(res->list[0]));
- memset(res, 0, sizeof(*res) + (length-1) * sizeof(res->list[0]));
+ res = XMALLOCFZ(compound_graph_path, list, length);
res->kind = k_ir_compound_graph_path;
res->tp = tp;
res->len = length;
res->kind = k_ir_compound_graph_path;
res->tp = tp;
res->len = length;