X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbemodule.c;h=dda79d97d1276ab8c9459fdc9ea8f4df117d337d;hb=afbbc0b1ccd684c4c24bfd43d0f994123245f39f;hp=c8c2116a2758e96ec9eedc29fdc2a904ce83c081;hpb=574ca753de816b23d1a669d03eee9d9f88282d22;p=libfirm diff --git a/ir/be/bemodule.c b/ir/be/bemodule.c index c8c2116a2..dda79d97d 100644 --- a/ir/be/bemodule.c +++ b/ir/be/bemodule.c @@ -250,9 +250,7 @@ int dump_opt_module_vals(char *buf, size_t buflen, const char *name, void be_add_module_to_list(be_module_list_entry_t **list_head, const char *name, void *module) { - be_module_list_entry_t *entry; - - entry = xmalloc(sizeof(entry[0])); + be_module_list_entry_t *entry = XMALLOC(be_module_list_entry_t); entry->name = name; entry->data = module; entry->next = *list_head; @@ -267,9 +265,7 @@ void be_add_module_list_opt(lc_opt_entry_t *grp, const char *name, be_module_list_entry_t * const * list_head, void **var) { - module_opt_data_t *moddata; - - moddata = xmalloc(sizeof(moddata[0])); + module_opt_data_t *moddata = XMALLOC(module_opt_data_t); moddata->var = var; moddata->list_head = list_head;