X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fana%2Fheight.c;h=482268f28a93fb1a5df278917769f789d2ebe531;hb=0cc8bfc863da28d3799e9eca1d1765d564b6e573;hp=6d3f708f461d7456b0a4223566e3027dc120e90c;hpb=8472896c6a2e92e7553852e2e17c3e7dfa869203;p=libfirm diff --git a/ir/ana/height.c b/ir/ana/height.c index 6d3f708f4..482268f28 100644 --- a/ir/ana/height.c +++ b/ir/ana/height.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -52,9 +52,10 @@ typedef struct { unsigned visited; } irn_height_t; -static void *irn_height_init(ir_phase *ph, ir_node *irn, void *data) +static void *irn_height_init(ir_phase *ph, const ir_node *irn, void *data) { irn_height_t *h = data ? data : phase_alloc(ph, sizeof(h[0])); + (void)irn; memset(h, 0, sizeof(h[0])); return h; } @@ -244,7 +245,7 @@ void heights_recompute(heights_t *h) heights_t *heights_new(ir_graph *irg) { - heights_t *res = xmalloc(sizeof(res[0])); + heights_t *res = XMALLOC(heights_t); phase_init(&res->ph, "heights", irg, PHASE_DEFAULT_GROWTH, irn_height_init, NULL); res->dump_handle = dump_add_node_info_callback(height_dump_cb, res); heights_recompute(res);