assert(!id_contains_char(name, ' ') && "entity name should not contain spaces");
- res = (entity *) malloc (sizeof (entity));
+ res = (entity *) xmalloc (sizeof (entity));
res->kind = k_entity;
assert_legal_owner_of_ent(owner);
res->owner = owner;
assert_legal_owner_of_ent(new_owner);
if (old->owner == new_owner) return old;
- new = (entity *) malloc (sizeof (entity));
+ new = (entity *) xmalloc (sizeof (entity));
memcpy (new, old, sizeof (entity));
new->owner = new_owner;
/*
entity *new;
if (old->name == new_name) return old;
- new = (entity *) malloc (sizeof (entity));
+ new = (entity *) xmalloc (sizeof (entity));
memcpy (new, old, sizeof (entity));
new->name = new_name;
new->ld_name = NULL;