X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fstat%2Fdistrib.c;h=08c358dc2dbefc01a1e050afb67c113c70aa7934;hb=ef3f4288a57fc536e74087390be6d0f33771511d;hp=2f8e6da5e846e6989a590f6f538983171b8c7327;hpb=3dab5244e697c20e7aac34a3327d071e15a97930;p=libfirm diff --git a/ir/stat/distrib.c b/ir/stat/distrib.c index 2f8e6da5e..08c358dc2 100644 --- a/ir/stat/distrib.c +++ b/ir/stat/distrib.c @@ -23,9 +23,7 @@ * @author Michael Beck * @version $Id$ */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "config.h" #include "hashptr.h" #include "irtools.h" @@ -60,9 +58,7 @@ static int int_cmp_fun(const void *elt, const void *key) { * create a new distribution table */ distrib_tbl_t *stat_new_distrib_tbl(pset_cmp_fun cmp_func, distrib_hash_fun hash_func) { - distrib_tbl_t *res; - - res = xmalloc(sizeof(*res)); + distrib_tbl_t *res = XMALLOC(distrib_tbl_t); obstack_init(&res->cnts); @@ -112,7 +108,7 @@ static distrib_entry_t *distrib_get_entry(distrib_tbl_t *tbl, const void *object if (elem) return elem; - elem = obstack_alloc(&tbl->cnts, sizeof(*elem)); + elem = OALLOC(&tbl->cnts, distrib_entry_t); /* clear counter */ cnt_clr(&elem->cnt);